如何链接本地PDF文件中的页面? [英] How can I link a page in a local PDF file?
问题描述
当用户使用jQuery单击按钮时,我会加载PDF文件,但它会从首页开始打开文档(一如既往).
I load a PDF file when user clicks a button using jQuery, but it opens the document starting from the first page (as it is always).
我想根据需要的章节链接特定页面.有什么办法可以使事情变得美好吗?
I would like to link a specific page depending of the needed chapter. Is it there any way to do this nice to have thing?
这是我打开文档的方式:
Here is how I open the document:
$('#btnManual').click(function() {
window.open('documentation/test.pdf');
});
推荐答案
要将HTML链接定位到PDF文件中的特定页面,请将#page=[page number]
添加到链接URL的末尾.
To target an HTML link to a specific page in a PDF file, add #page=[page number]
to the end of the link's URL.
例如,此HTML标签打开名为myfile.pdf的PDF文件的第4页:
For example, this HTML tag opens page 4 of a PDF file named myfile.pdf:
<A HREF="http://www.example.com/myfile.pdf#page=4">
更多信息: https://helpx.adobe .com/acrobat/kb/link-html-pdf-page-acrobat.html
这篇关于如何链接本地PDF文件中的页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!