0

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?

Thanks.

1

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....

0

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 '16 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. – Tushar Sharma May 10 '16 at 16:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.