SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Evangelist Barnum's Avatar
    Join Date
    Oct 2008
    Posts
    418
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Adding pdf images?

    how do I add an image to my site that is in pdf format?

    <img src="images/Article1.pdf" width=300" height="400"> was what I used, but nada?

  2. #2
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,882
    Mentioned
    122 Post(s)
    Tagged
    1 Thread(s)
    You need to copy the relevant section of the PDF, paste it into an image editor, and save it as a PNG, GIF or JPG, as these are the only image formats that natively supported by HTML browsers.

  3. #3
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    Do you actually mean embed an OBJECT in a page?

  4. #4
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    Basically what both Stevie and xhtmlcoder are saying is that PDF's are not images, they're PDF's... they are not image file formats, nor are they supported by the HTML IMG tag. Image is for images -- gif, png, jpeg -- NOT PDF's.

    If it's an image, turn it into an actual image... if it's an actual PDF of text, turn it into HTML instead of a PDF -- or as XHTML coder suggested use OBJECT...

    Though honestly, PDF's as objects in websites is an accessibility /FAIL/ and another of my many, MANY pet peeves -- if it's just a PDF make it a download, instead of the half-assed browser embedded nonsense. PDF's "in the browser" suck - universally.

  5. #5
    SitePoint Evangelist Barnum's Avatar
    Join Date
    Oct 2008
    Posts
    418
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Thanks for squaring me up.... I scanned the pages again, and saved as jpg. Works fine...

    Thank you all again.


Bookmarks

Posting Permissions

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