Q: How can I create a web link to load the target PDF, and be automatically taken to the part of the PDF document specified in the calling URL?
A: If you have a PDF file that is stored on a web server you can create an HTML Link to point to a specified location in the PDF by adding arguments to the end of the URL address. There are 2 options available:
Note: This only works for HTTP or HTTPS locations and requires the browser or PDF viewer plugin (currently supported by most major applications) to support the destination property in the URL. If the application or browser does not then it will just open to the first page of the document.
Opening to a Specific Page
An HTML link can be used to open to a specific page of the PDF file by adding the argument “#page=[page number]” to the end of the URL.
For example, the below URL will open a PDF file named sample.pdf to page 4:
You can also use this HTML tag in a web page to open a PDF file named sample.pdf to page 4:
<a href=”http://www.example.com/sample.pdf#page=4″>link text</a>
Opening to Destination Set Within the PDF
A Destination is a named end point (similar to an anchor in HTML) stored within the pages of the PDF document. Destinations can also be used in an HTML URL to point to a specified destination by adding #[destination name] to the end of the links URL.
Create a destination with the PDF follow the steps below:
- Open the Destinations pane by clicking on the button on the left side of the PDF Studio window
- Set the Zoom and page location to the way you want it on the screen
- Click on the Create Destination button
- Give the destination a name and Click OK to apply the changes
Note: Using a name that does not have any spaces makes it easier to link to afterwards
Create the HTML link to open to the Destination in the PDF by adding the argument “#[destination name]” to the end of the URL.
For example, the below URL will open a PDF file named sample.pdf to a destination named “index”:
You can also use this HTML tag in a web page to open a PDF file named sample.pdf to a destination named “index”:
<a href=”http://www.example.com/sample.pdf#index”>link text</a>