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
prad_p25prad_p25 

Visualpage ...help needed

Hi,

 

I have created visual page which list out all the candidates lists with the jobs they have applied for. Now I want a link at the bottom of this list which says "export to pdf". which is another visualpage only. By clicking this link one can open the same page in pdf format.  I have tried with commandlink option but not working. Please suggest.

iBr0theriBr0ther

I experienced this pb! sf seems not allow to do in the same page.

duplicate the page and set as pdf format with difference name and call it.

this what I did. any better solution is appreciated? 

prad_p25prad_p25

How to call it. can you share the code.

stephanstephan

The best way to do this is to create a page that you can include from both the HTML and PDF versions. That way you won't have to maintain two identical versions. For example:

 

Page: loremipsum

 

<apex:page showHeader="false">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
Suspendisse quis risus eu sapien luctus luctus. 
Sed blandit mi sed ipsum scelerisque fringilla.
</apex:page>

 

 

Page: htmlloremipsum

 

<apex:page >
<apex:include pageName="loremipsum"/><br/><br/>
<apex:outputLink value="/apex/pdfloremipsum">Click here to view as PDF</apex:outputLink>
</apex:page>

 

 

Page: pdfloremipsum

 

<apex:page showHeader="false" renderAs="pdf">
<apex:include pageName="loremipsum"/>
</apex:page>

 

...stephan