Thursday, September 06, 2007

Testing embeding PDF file into post

I am testing embedding a PDF file using Scribd. This is a small PDF file. I will test embedding a larger PDF file with images later:



Result: Success. Even though I tweaked the script for embeding the file to fit the width of the main column, part of the embeded PDF file still extended into the right sidebar. I will have to check the width of the main column (posts) again and try once more.

Update: Turned out there were 2 places in the script where I had to change the width and the height, just like the script for embedding a Youtube video. As you can see above, the PDF file fits the main column nicely and does not extend into the right sidebar anymore. I will do a post on how to do this in my main blog and post a link to that post later.

Update 9 September 2007: Instruction on how to do it, including tweaking the script to make the PDF file fit into the post, is give at Embed PDF file into post

15 comments:

Blanca López said...

Thank you! It took me a little to do it but I was able to post a pdf file on my blog....Thanks for the tip!

Laurie said...

Is there any way to embed a download link to a pdf into a post, without the image?

Peter @ Enviroman said...

You mean something like this:

Download pdf file
(target site only an example)

Laurie said...

Yup. Exactly... I played around with the Layout and figured out how to make the title of a post be a link to a file posted on another site (I copied the url from the file on the other site). But I don't know how to link to a file that doesn't have a URL (ie: that I post from my computer), or to make text work as a link to a download like your target site example. Thanks for helping.

Peter @ Enviroman said...

"But I don't know how to link to a file that doesn't have a URL (ie: that I post from my computer)"

What do you mean "I post from my computer"? Do you mean a file you saved in your computer? If so, the answer is no, not unless your computer is used as a web server

Laurie said...

Thanks so much. Yes, I did mean that I had saved on my computer (which is not a web server). Oh well... I guess I just have to find the originals of any files I want to have on my blog.

Can you tell me how I can create a text link to the download (like you did in your comment "Download pdf file") instead of just having the title of the post BE the link?

Peter @ Enviroman said...

I see your confusion. I have actually wanted that link to download a file which had been uploaded to a file hosting website but probably was lazy and .....

Ah now I remembered why I put that particular link because that post contain an embedded PDF file and thus it may achieve the same goal of getting to a PDF file.

BTW how did you get to this post as I don't expect many surfers to find this post through a search engine?

Laurie said...

First of all, how I got to your post. That's a hard one! I did a lot of searching but did so first on Google's blogger Help. Maybe there was some search or link from that? I don't really remember since I kept going from response to response to find something relevant.

So yes, I saw your post with the embedded file, but I don't need a picture of the file, and the "download pdf" link on the bottom is so tiny it's barely readable. That's why I don't want the picture of the pdf on my blog, just a text link to download it. Can you tell me how to do it? Can I do it easily using the Compose tool and not html?

Peter @ Enviroman said...

Then you don't need Scibd for that, too much bother. Why don't you just upload the PDF file to a free file host. You can google for it using any search engine you like. you will find plenty. yhey will give you a URL for you to make an active link to do it.

Laurie said...

wow... that sounds easy. Thanks so much!

សុខា said...

Sir, do you know how to post Djvu file on blog? And big thank for the tip.

Peter @ Enviroman said...

Sent me the file at contact me contact me to establish email contact then you can email attachment to me your djVu files

Brian Carey Photography said...

Great help! Thanks!

mccuilcan said...

What does the djvu document is?

Peter @ Enviroman said...

stima, what djvu? I never mention anything like that in this post or any post?