Hi, I am a brand new user of MODx thrown in at the deep end so self education! I have uploaded a PDF to my website however it will not preview when it is loaded into a page, the only graphics that the website seems to show are .JPEG and .PNG can anyone advise me what the problem may be? I can't seem to find any documentation to suggest what I am missing!
-
☆ A M B ☆
- 24,524 Posts
You would need a PDF viewer of some kind of you want the .pdf to be viewed within your web page. HTML will display images, but not .pdf or other types of files.
http://www.jqueryrain.com/2012/09/best-jquery-pdf-viewer-plugin-examples/
http://flexpaper.devaldi.com/
Well, actually, you can use HTML 5 object elements to view a PDF, or possibly an IFrame, if the user's browser feels like cooperating.
http://stackoverflow.com/questions/13084148/how-to-display-pdf-content-in-web-page-using-html5-and-jquery
http://stackoverflow.com/questions/14690000/embed-pdf-in-html5
Hi Scottwell, thank you for your reply, its been really useful.
-
☆ A M B ☆
- 24,524 Posts
I'd be interested in knowing what you finally used, and even a link to the results, if that's possible.
-
☆ A M B ☆
- 1,780 Posts
Make a resource, set the content type to PDF (packaged with 2.3x I believe, prior versions the PDF content type will need to be added manually), set the resource type to static and the content disposition to inline. Then set the static resource to your PDF file. View the resource in your browser.
If you want the PDF to download instead of view in the browser, set the content disposition to attachment instead of inline.
Keeps editors out of your file system for the most part, and also allows you to link to the PDF by [[~id]] throughout the site. Makes it very easy to update the PDF site wide, just change the static resource file name or replace the file itself as needed.
Hi Frogabog, thanks for your response, much appreciated.