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
Kalpesh_007Kalpesh_007 

Converting a VisualForce Page to a image

Is it Possible to Convert a Visualforce Page as a Image.

Cory CowgillCory Cowgill

You can convert a Visualforce Page to a PDF, Word, or Excel document using the "RenderAs" Attribute on <apex:page> tag.

 

You cannot render it as an image to my knowledge.

 

http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_page.htm

 

renderAs String The 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.   13.0 global

Adil_SFDCAdil_SFDC
Hi Cory. is there a way I can render as an image. coz when i render as pdf my fonts are lost and looks like VF to pdf only supports 4 fonts. 
is there a work around you know or can suggest. 
Highly appreciate your help.