网页嵌入pdf 时的参数
-
src – Specify the path of the external file to embed.
-
type – Specify the media type of the embedded content.
-
width – Specify the width of the embedded content.
-
height – Specify the height of the embedded content.
<embed src="files/Brochure.pdf" type="application/pdf" width="100%" height="600px" />
不常用:
-
page=pagenum – Specifies a number (integer) of the page in the document. The document’s first page has a pagenum value of 1.
-
zoom=scale – Sets the zoom and scroll factors, using float or integer values. For example, a scale value of 100 indicates a zoom value of 100%.
-
view=Fit – Set the view of the displayed page.
-
scrollbar=1|0 – Turns scrollbars on or off.
-
toolbar=1|0 – Turns the toolbar on or off.
-
statusbar=1|0 – Turns the status bar on or off.
-
navpanes=1|0 – Turns the navigation panes and tabs on or off.
Disable and Hide Toolbar in PDF Web Viewer
This example shows how to hide or remove the toolbar, navpanes, and scrollbar of the PDF file opened in HTML <embed> using parameters in URL.
Use the following code to embed PDF document in the web page and remove or hide toolbar of embedded PDF.
<embed src="files/Brochure.pdf#toolbar=0&navpanes=0&scrollbar=0" type="application/pdf" width="100%" height="600px" />