Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML hyperlink to a specific page of a pdf file

Consider a very simple link to a pdf file in HTML:

<a target="_blank" href="mypdf.pdf">Link to pdf</a>

Of course, when the user clicks on the link, the pdf is open and the first page is shown in the browser.

Is there a way create a link to a specific page of the pdf? I was wondering if there is some command like this:

<a target="_blank" href="mypdf.pdf#11">Link to page 11 of the pdf</a>

or some trick based on Javascript.

like image 934
the_candyman Avatar asked Jun 02 '19 08:06

the_candyman


People also ask

Can you link to a specific section in a PDF?

Choose Tools, click on Edit PDF, then on Link, and finally, select Add/Edit Web or Document Link. Select the area that you want to hyperlink. Then, in the Create Link dialog box, choose the options you want for the link appearance and click on the Open a Web Page button for the link action.

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.

Can I hyperlink to a specific page of a PDF file Google Drive?

In Google Drive, we can open PDF files and set a link to a specific page with Google Docs. Google Docs is a practical and free word processor that allows users to edit text, draw, insert images, add text box, compare documents, add watermarks and comment on PDF.


1 Answers

I found answer on adobe forum https://forums.adobe.com/thread/2345594.

After # you should write something like #page=3 for example, to move automatically to page 3.

like image 91
Robert Gardziński Avatar answered Nov 01 '22 17:11

Robert Gardziński