Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to embed PDFs in html

Status
Not open for further replies.

blondebier

Programmer
Jun 19, 2003
142
GB
Is it possible to display a pdf document in my html web site? Is it possible with html or do I need scripts?

Many thanks for your comments
 
You can create a thumbnail image of the PDF as a GIF or JPG and LINK to it from the thumbnail, but I don't think you can directly include the PDF in the HTML.
 
I don't know about thumbnails, but embedding a PDF in a document is straightforward. You just use the venerable <embed> tag:

<embed src=mydoc.pdf height=400 width=600/>

Embed is being deprecated, though, so you might want to use the more generic <object> tag.

If anyone knows of a good PDF thumnailer/rasterizer, I'd like to know about it!

GhostScript/ImageMagick will do the trick, but I'm looking for something more direct.

Thomas D. Greer
 
Although I am sure it is not a particularly good way of creating a thumbnail of a PDF, I just take a screenshot of the opened PDF, paste into Paintshop Pro (faster than Photoshop) resize, add a border and save in most appropriate web graphic format (JPG for photos, GIF for everything else).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top