Results 1 to 6 of 6

Thread: How to display PDF picture in HTML??

  1. #1
    Join Date
    Apr 2007

    Smile How to display PDF picture in HTML??

    If I want to display picture in HTML, the source code is:

    <img src="image.jpg"> but how about if I want to display PDF in HTML??

    I try <img src="image.pdf"> but does not work.....

    Pls advice. Thanks.

  2. #2
    Join Date
    Nov 2002
    Baltimore, Maryland
    What you want to do you cannot do, well not something that really works. For those who have their browsers configured to display PDFs, not all are, you can use an IFRAME or an OBJECT.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  3. #3
    Join Date
    Mar 2007
    Nagpur (India)
    PDF is not an image, so you can't use it in <IMG> tag.
    If you want to see the content of the pdf, you have the respective application for the same.
    like, Acrobat, Foxit, etc.

    And if you are trying to view by using the HTML then try the following...

    <iframe src="pdf_file_path" title="your_title" align="top" height="620" width="100%" frameborder="0" scrolling="auto" target="Message">
    <!-- Alternate content for non supporting browsers -->
    <p align="center">Please click <a href="window.location.href='your_script.php'">here </a> to continue.</p>
    Suhas Dhoke
    Zeon Solutions Pvt. Ltd. Nagpur.

  4. #4
    Join Date
    Jan 2013
    To be frankly, I don’t understand the PDF image you mentioned. I agreed with Suhas Dhoke’s attitude, PDF is not an image.
    In addition to the codes Suhas Dhoke provided above, you can also try pdf to html converter. There are some free tools help to do the conversion automatically online or offline. People who do not familiar to programming code can try this method. 3DPageFlip just provides such kind of tools. I have found the 3DPageFlip PDF to HTML converter on the free-ebook-tool page.
    Hope that helps!

  5. #5
    Join Date
    Jan 2013
    I think what the OP is referring to is a vector/bitmap image embedded in a PDF file. (eg. a drawing of a cat, or a logo)

    In this case, the simplest thing to do would be to convert the PDF to SVG (a good free application that will let you convert the PDF and edit it is Inkscape) and then use the <img>, <object>, <embed> or <iframe> tag to embed it in the HTML document (More info Here). This means the viewer doesn't need any additional plugins or applications to view the image, but will need a modern browser.

  6. #6
    Join Date
    Jul 2012
    I think you can convert PDF to a html webpage so that you can show it on web. I would like to recommend to kvisoft.com/flipbook-maker/convert PDF to flipbook(flash-based, HTML) so that you can easily embed it on web.

    *** link edited to plain text by moderator ***
    Last edited by jedaisoul; 07-30-2014 at 03:38 PM. Reason: spam

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center