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

Render attachment on visualforce page based on file extension


How to render attachment on visualforce page based on file extension.
Also how to download attachment from visualforce page without attachment as standard controller.

Hi Mayur, 

The code for PDF and msWord is different and does not fall under the attachments based on file type. 

See the below links for PDF and Word, 

Rendering a Page as a PDF

render VF page as word document

How to download a VF page as PDF and email it from a trigger?

How do I convert a visualforce page to a PDF?

Visualforce Force Download of PDF or Other Content