2010-01-26

How to embed a PDF in your blog

Pictures are more compelling than words. Don't just link to your files; display them inline on your web page. Here's one way to do it for PDF files.

First, create your PDF file. Sometimes, I use PDF Creator to print my documents as PDFs. Other times, I use Google Docs and download as PDF.



Next, upload your PDF to a hosting service. To keep my life simple, I use Google for most of my services (blog, file hosting, email, etc.). For file hosting, I usually use my Google Group http://groups.google.com, and I add the file to my group's files area. Wherever you are hosting your PDF, get the file's URL and remember it. To get the URL in Google Groups, copy the URL from the group's home page.


In your web site or blog entry, use the HTML editor and paste this in:
<embed width="500" height="400"
src="YOUR-FILE'S-URL"
type="application/pdf"></embed>
Replace YOUR-FILE'S-URL with your file's URL and adjust the height and width until your file looks just right. For example:
<embed width="500" height="400"
src="http://kasperowski.googlegroups.com/web/Lorem_Ipsum.pdf?gda=fgHlT0IAAAB9NSqFSUZ4my1XnTmAzatRKss20G3okKOZw_LQC4MWh1pazQzA1Y3wmQZCwg1GBwNV4u3aa4iAIyYQIqbG9naPgh6o8ccLBvP6Chud5KMzIQ&gsc=Ik-cOwsAAAA2aCl8QlzhEbdLlnpwZG-l"
type="application/pdf"></embed>
That's it--now your PDF is displayed inline on your web page.

No comments:

LinkWithin

Related Posts with Thumbnails