• Hi, I know that you can link to a pdf document in WP, but I want to actually display the document on the page.

    Can this be done and if yes,how ?

    Would really appreciate a quick answer as I have to complete this task today. Thank YOU !

Viewing 15 replies - 1 through 15 (of 23 total)
  • <embed src="NAME OF FILE.pdf" width="500" height="375">

    Thread Starter Ballet News Admin

    (@ballet-news-admin)

    Thank you very much. One question : where do I put the coding ? Thanks

    If you want to display pdf file in your post, go to HTML editor and place this code…

    Thread Starter Ballet News Admin

    (@ballet-news-admin)

    thank you. Anywhere in the editor – or where I want the page to display ? I have text to add as well.

    Also, how do I get the PDF into the media gallery in the first place ?

    Thanks

    I will show you step by step:

    1) Go to media -> Add New, upload a file. Once file is uploaded, you will get File URL. Copy that file URL. (Let me call it MY_PDF_URL)

    This will be a complete URL, with http://yourdomain.com in it..
    2) Now, go to add new post and switch to html editor. Place this code where you want to show the pdf file….

    <embed src="MY_PDF_URL" width="500" height="375">

    ————-

    added: wait.. I think this is not working for wordpress. Because wordpress is changing the complete code.. !!!

    You can place that code in your template files.. or use this plugin..
    http://wordpress.org/extend/plugins/pdf-and-ppt-viewer/

    Thread Starter Ballet News Admin

    (@ballet-news-admin)

    sorry I did all that, actually I imported the pdf from my computer. All I get is a big brown square – and that’s before I upload the media – when I added your code. Adding the media into the post still just gives me a link and even that goes nowhere

    using that plugin and steps I provided works together perfectly..

    Thread Starter Ballet News Admin

    (@ballet-news-admin)

    Sorry, what plug in ? You gave me code to use. And it doesn’t work at all, let alone perfectly !

    Yes, this is not working for wordpress. Because wordpress is changing the complete code.. !!!

    You can place that code in your template files.. or use this plugin..
    http://wordpress.org/extend/plugins/pdf-and-ppt-viewer/

    using that plugin and steps I provided works together perfectly..

    Moderator cubecolour

    (@numeeja)

    Great tip Rahul, but I think for valid XHTML you would probably want to close the embed tag:
    <embed src="MY_PDF_URL" width="500" height="375"/>

    Thread Starter Ballet News Admin

    (@ballet-news-admin)

    IT DOESN’T WORK. All it does is link to the document.

    Can you provide clear steps that work please ?

    I have installed and activated the plugin you suggested.

    Thread Starter Ballet News Admin

    (@ballet-news-admin)

    Hi, has everyone given up with this ?

    If I could have a step by step list of what to do, using the plugin, that would be really helpful.

    I’m on a deadline and have to get this out in an hour. thankyou so much

    Thanks for the correction cubecolour..
    Upload that plugin and activate it.

    Then use the code I have provided in your post (HTML editor):

    <embed src="MY_PDF_URL" width="500" height="375"/>

    This will work. See this post:

    http://www.amrita-rao.in/latest-pictures/test/

    Password: 12345678

    Thread Starter Ballet News Admin

    (@ballet-news-admin)

    Well, I’ve had a wordpress expert have a go because obviously I can’t get it to work. This is what I was told : For the plugin, in IE I see a blank box come up. It seems to be
    denying cookies to google docs by default (which it uses to display).

    So what do you suggest now ?

    We even tried a diffrent plugin which still didn’t work.

    thanks

    then you can always upload pdf files to your server. Use media library available in wordpress, which will upload documents on your server. Then use that URL in that code.

    I dont know if google docs provide such feature.

Viewing 15 replies - 1 through 15 (of 23 total)
  • The topic ‘PDF display in WordPress 3’ is closed to new replies.