Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML link to specific pages in PDF

Tags:

hyperlink

pdf

I have looked around the web and have found that appending #page=?? to the end of a PDF link will automatically take the visitor to that specific page in the PDF file.

I was wondering if this is still best practice as it doesn't seem to be working for me (Chrome on Windows 7). Also, all the articles I have found so far date back to 2006-2008, have things changed recently?

like image 745
Daveth3Cat Avatar asked Feb 04 '13 16:02

Daveth3Cat


People also ask

How do you hyperlink a PDF in HTML?

You link to a PDF file the same way you would link to an HTML file: using the "a" anchor tag and the URL address of the PDF. This causes the PDF file to open or download, depending on the user's browser, when the user clicks on your link.


1 Answers

This is still valid code but it may require that some version of Acrobat (Reader, Pro, etc) be installed as a plugin on the browser in order for it to work as expected. Since multiple commonly-used browsers now have a built-in reader (Chrome, Safari for iOS are the big two that come to mind) support for direct page linking is somewhat spotty now. You can still do it...the worst case scenario is that the PDF just opens to the first page for those users but I would advise to just leave off the direct page link. If the page is that important, extract it to a separate PDF and link to that.

like image 108
JCL1178 Avatar answered Sep 22 '22 12:09

JCL1178