HTML & CSS
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?
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.
Do you actually mean embed an OBJECT in a page?
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.
Thanks for squaring me up.... I scanned the pages again, and saved as jpg. Works fine...
Thank you all again.
This topic is now closed. New replies are no longer allowed.