在HTML中嵌入pdf文档时跳转到特定页面 [英] Jump to a particular page when embedding pdf document in HTML
本文介绍了在HTML中嵌入pdf文档时跳转到特定页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试将pdf文件嵌入HTML:
I am trying to embed pdf file in HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<head>
<title></title>
</head>
<body leftmargin="0" topmargin="0">
<embed src="mypdffile.pdf#page=9" style="width:595px; height:841px;"></embed>
</body>
According to PDF SDK https://docs.google.com/viewer?url=http://www.adobe.com/devnet/acrobat/pdfs/pdf_open_parameters_v9.pdf#search=&embedded=true&chrome=true it is possible to jump to a particular page while opening pdf document. But it doesn't work at least in Safari with AdobePDFViewer.plugin on MAC OS X.
我错过了什么吗?
推荐答案
您可以使用以下代码:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<object type="application/pdf" data="mypdffile.pdf" width="995" height="841" ></object>
<a href="mypdffile.pdf#page=9">Jump to page 9</a>
</body>
</html>
您可以进一步修改pdf文件以及您希望显示/隐藏的数据属性(根据Adobe的指导).
You can modify further the pdf file and what you wish to show/hide adding attributes on the data (according the adobe directions).
例如data="mypdffile.pdf#navpanes=0&scrollbar=0&toolbar=0&zoom=100
这篇关于在HTML中嵌入pdf文档时跳转到特定页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文