You need to sign in to do that
Don't have an account?
AhmedPot
Can I display attached PDF or word document embedded inside a visualforce page
Hi,
I want to display uploaded PDF/word document inside a VF page. I mean user should be able toview the contents of the attached pdf/word file, when they are viewing the page.
Is it possible. Any pointers on how to achieve this?
Unfortunetly there is no out of the box visualforce way to do this. You'll need to use some other tricks. This site has some useful info on embeding PDFs, http://pdfobject.com/markup/index.php . Word docs on the other hand I am not so sure about as they don't play nice with browsers other than IE.
Here are some other useful links:
http://www.scribd.com/developers
http://stackoverflow.com/questions/291813/best-way-to-embed-pdf-in-html
Thanks so much. Those links were quite helpful.
For pdf files, I tried using apex:iframe tag
when we click on view attachment, it shows pdf file in browser. So i passed that url inside apex:iframe tag and it is showing it properly inside VF page.
But same thing is not working with word files, it shows open/save dialog box when i view it.
Is there any property that we can set when we are viewing word docs so that it will open it in browser like PDF files, rather than showing open/save dialog box.
Thanks,
Ahmed
Word files don't embed in any browser but IE. there is no good way to handle word files. You'd have to upload them to a service like scribd and then use their view app to display it.