Hi! Everyone, hope you all are fine.
Today in this post I will tell you how you can embed PDF file into your blog or webpage. Now days PDF files are being used a lot and the uses of it is still increasing. And many people like blogger, developer, etc put PDF file link on the page for visitors but when visitor open it in there browser it takes the entire browser to view even if the page is small then the screen.
Here how you can embed PDF file
1. Get the link of the PDF file you want to embed
2. Now copy the below code
<embed src="PDF-URL" width="500" height="375"></embed>
3. Changes to make in code
i) PDF-URl with your PDF file URL
ii) Change the value of height and width according to your need
4. Now past the code where you want to embed your PDF file
Here how your embedded PDF file will look
Note: - If in your computer Adobe Reader plugin is not installed or if you are using Google Chrome browser then you might not able to view the PDF file embedded, it will show a plugin error and it will ask you to install.
Here few tricks by which you want make the visitors view as you want them to by using some parameters.
After your PDF file URL put a # then use any of the following things
toolbar=0 to hide the Tool bar
e.g.: http://img.sjbn.co/files/example-PDF.pdf#toolbar=0
navpanes=0 To hide the navigation bar
e.g.: http://img.sjbn.co/files/example-PDF.pdf#navpanes=0
scrollbar=0 to hide the scroll bar
e.g.: http://img.sjbn.co/files/example-PDF.pdf#scrollbar=0
search=word to show the searches of the word you want
e.g.: http://img.sjbn.co/files/example-PDF.pdf#search=word
If you want to use more than one from the above use & after each
e.g.: http://img.sjbn.co/files/example-PDF.pdf#scrollbar=0&navpanes=0&toolbar=0&search=word
Note: - You may or may not able to view in Google Chrome as because Google Chrome has its own PDF viewer so it don’t use Adobe reader plugin. However you can still make it work in Google Chrome by using iframe tag instead of embed tag (it will also work in other browsers also).
Here a demo using iframe tag
If you have any questions or problem let me know
4 comments:
Hey Saket. This is very useful information. I have needed to embed pdf's in the past but didn't have a clue how to do it. Great step by step instruction. Keep it up!
Andy
http://www.andyrockwellmarketing.com
@Andy Thanks, if you need any help in anything in which I can help let me know...
Good share dude, :) i will make us of it one of my posts
@Praveen Thanks... :)
Post a Comment
Recommended While Commenting Please Add Your Name And Not To Add Your Email ID Till It Is Not Asked By Me "Saket Jajodia"...
Note: Only a member of this blog may post a comment.