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
Otilia StraitOtilia Strait 

Generate a PDF document

Hi all,

I would really need your help. :(

I need to generate for my organization a PDF document (Order Insertion for our advertising campaigns). I would need to add different fields that the SF users could fill in, like: Campaign Name: xxxx , Campaign Start Date: xx/xxx/xxxx, Price: xx/CPM, etc.

Also, I need to add a header (picture- logo of the company) and a footer (contact, signature, etc).

Basically, I have the Order Insertion in a .xlsx format and I would like to transfer all the info from the Excel in Salesforce. As I understood, it could work with VisualPage creation and customization but I think I need some programmatic help.

Thank you very much for your answer,
Greg HGreg H
I wrote about this a few years ago. Here's a link to that post: It may help to get you started. Good luck.
Deepali KulshresthaDeepali Kulshrestha
Hi Otilia,

For converting vf page into pdf, modify the <apex: page> to.

<apex:page renderAs="pdf">

For converting vf page into excel, modify the <apex: page> tag to include the contentType="application/">

<apex:page standardController="Account" contentType="application/">

For more pdf page detail I suggest to visit this link, it will help you

For creating the whole page in excel, I suggest to visit this link, it will help you

Thanks and Regards,

Deepali Kulshrestha.