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');
});
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.
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">
More info: https://helpx.adobe.com/acrobat/kb/link-html-pdf-page-acrobat.html
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.