function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
James Simpson 6James Simpson 6 

How to create a VF page that pushes a VF PDF component to ContentWorkspace?

We have a VF Component which produces a PDF for us that is currently used by a VF page which creates a PDF preview in the browser. But I want to write a VF page that pushes the PDF either into Notes & Attachments or into a ContentWorkspace.  Can you please help point me to a post or article that explains how to create the VF page to do that?
James Simpson 6James Simpson 6
This is the current VF page code that I want to amend to incorporate the above:

User-added image

Here's the text pasted:

<apex:page standardController="c2g__codaInvoice__c" extensions="c2g.CODASalesInvoicePrintController" action="{!viewPdf}" > <apex:sectionHeader title="{!$Label.c2g__codaEBVPrintPagesSINVTitle} {!c2g__codaInvoice__c.Name}" subtitle="{!$Label.c2g__codaEBVPrintPagesViewSINVPDF}" />
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection columns="1">
<apex:pageBlockSectionItem >
<apex:pageMessages />
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
<apex:pageBlockSection columns="1">
<apex:pageBlockSectionItem >
<apex:commandButton value="{!$Label.c2g__codaEBVPrintPagesBackButton}" action="{!cancel}"/>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>