Is there anyway you could read an attachment on your record(PDF, Image, Word etc) and display it as PDF on your visual force page?


2 Answers 2


Yes you can, but you have to create a custom VF page that show the attachment, once you have that VF ready with its controller, you only need to render that page as a PDF.

You can achieve that with this at the beginning of your VF page:

 <apex:page standardController="XXX__c" renderAs="pdf">

I hope it helps....


I don't think that would be possible. You can display Image or some html files too. But display PDF and word is not possible out of the box.

You can try to display pdf using iframe in the iframe src.

  • My use case is more of querying all the attachment body and somehow combining their body onto a pdf and attach it back on a different record..
    – user321522
    May 10, 2016 at 12:24
  • @user321522 you can do it with images but to attach PDF, word docs its not possible out of the box. You need to do lots of thing javascript library might help. May 10, 2016 at 16:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .