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


Comments

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

thanks to share this with us.

Author: anil14 Jun 2010 Member Level: Bronze   Points : 2

Hi,

I m using the same way to render PDF in HTML, but i m doing it in MVC like this

Response.BinaryWrite(bArr);
Response.Flush();
}
}

the problem is, as i m downloading data first from server and then return the byte data, it is taking some time in downloading, so i want to show some kind of progress to show processing.

Please help me on this



  • 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:
    Email: