PDF file load into HTML page

We can embedded PDF File into HTML page like that QuickTime movies, Flash, MPEGs, and WAV files.

So wen can use the trick of load PDF into HTML page on Page load using embed tag as following:

< embed src="abc.pdf" width="500" height="650" > </embed >

here src is use for source file of pdf file. and width and height is use for set display with and height. we can use the % instead of pixels.

Just a note, < embed > is not an XHML standard, although it is supported by many browsers.

Your code to meet the XHTML standard then you better use the < object > tag instead < embed > tag.

< object type="application/pdf" data="abc.pdf" width="600" height="750" < >/object >

If the browser do not support < object > or cannot find its program then you can add anything as an alternative Between the opening and closing tags.
For example, you can add the link to the PDF file if it cannot be viewed in the page:

< object type="application/pdf" data="abc.pdf" width="600" height="750" >
Click < a href="abc.pdf" > here </a > to view the file </object >

You can add the parameter like that:

For toolbar: 1 = show, 0 = not show

For navpane: 1 = show, 0 = not show

For scrollbar . 1 = show, 0 = not show


Author: Jayendra Kumar03 Mar 2010 Member Level: Gold   Points : 0

thanks to share this with us.

  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name: