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
RajendRajend 

Visual force page - conflict between html and pdf rendering

 

Greetings.

 

I have an issue in rendering a visual force page between html and pdf format. HTML rendering is bringing the text area, select box, check box etc but when I do the same in pdf I am not seeing any of those html components. Is there any way to render the same between PDF and HTML?

 

 

Thanks a bunch.

Best Answer chosen by Admin (Salesforce Developers) 
krishnagkrishnag

looks like i found the problem.there is a limitation of render as pdf from salesforce

 

renderAsThe name of any supported content converter. Currently pdf is the only supported content converter. Setting this attribute to pdf renders the page as a pdf. Rendering a Visualforce page as a PDF is intended for pages that are designed and optimized for print. Standard components which are not easily formatted for print or contain form elements like inputs, buttons, any component that requires JavaScript to be formatted, should not be used. This includes but is not limited to, any component that requires a form element. Verify the format of your rendered page before deploying it. If the PDF fails to display all the characters, adjust the fonts in your CSS to use a font that supports your needs. For example, <apex:page renderas="pdf"> <style> body { font-family: Arial Unicode MS; } </style> Note that the pageBlock and sectionHeader components do not suppor double-byte fonts when rendered as a PDF.

All Answers

krishnagkrishnag

as of my knowledge i had the smae problem came up.I came to know that in pdf rendering u cannot use input text areas or text boxes.you can only display the value in the boxes.

 

i think i am right i am not pretty sure.

krishnagkrishnag

looks like i found the problem.there is a limitation of render as pdf from salesforce

 

renderAsThe name of any supported content converter. Currently pdf is the only supported content converter. Setting this attribute to pdf renders the page as a pdf. Rendering a Visualforce page as a PDF is intended for pages that are designed and optimized for print. Standard components which are not easily formatted for print or contain form elements like inputs, buttons, any component that requires JavaScript to be formatted, should not be used. This includes but is not limited to, any component that requires a form element. Verify the format of your rendered page before deploying it. If the PDF fails to display all the characters, adjust the fonts in your CSS to use a font that supports your needs. For example, <apex:page renderas="pdf"> <style> body { font-family: Arial Unicode MS; } </style> Note that the pageBlock and sectionHeader components do not suppor double-byte fonts when rendered as a PDF.
This was selected as the best answer
RajendRajend

Thanks for your finding.