Reputation: 1161
The #
operator is often used to refer to an anchor in HTML code. For example like this:
<a href="http://www.example.com/mypage.html#myanchor">
Open mypage.html and auto scroll down to myanchor
</a>
I have created a pdf which contains a so called destinations
. One of the destinations is named mydestination. I would like to deep link to this destination and wrote the following code:
<a href="http://www.example.com/mydoc.pdf#mydestination">
Open mydoc.pdf and auto scroll down to mydestination
</a>
When I click on the link in Internet Explorer and Mozilla Firefox, mydoc.pdf is opened and scrolled down to the destination mydestination
. When I click on the link in Google Chrome mypage.pdf is opened and not scrolled down.
This alternative syntax using nameddest
also works fine in IE and FF and not in Chrome:
<a href="http://www.example.com/mydoc.pdf#nameddest=mydestination">
Open mydoc.pdf and auto scroll down to mydestination
</a>
As a workaround I implemented the following solution:
<a href="http://www.example.com/mydoc.pdf#page=2">
Open mydoc.pdf and auto scroll down to page 2
</a>
When I click on the link in IE, FF and Chrome, mydoc.pdf is opened and scrolled down to the beginning of page 2.
So Google Chrome is able to scroll down based on an argument supplied after the #
operator. Is it possible to set this argument in such a way that it will scroll down to a destination?
Upvotes: 4
Views: 5649
Reputation: 21
A destination is the end point of a link represented by text in the Destinations tab. Destinations enable you to set navigation paths across a collection of Adobe PDF documents. Linking to a destination is recommended when linking across documents because, unlike a link to a page, a link to a destination is not affected by the addition or deletion of pages within the target document.
To set a destination in Acrobat 7.0 (Professional or Standard):
Set the Zoom and page location to the way you want it on the screen.
Select View > Navigation Tabs > Destinations to open the Destinations tab.
Select Options > New Destination from the Destinations tab.
Give the destination a name.
Create an HTML link that points to this destination by adding #[destination name] to the end of the links URL.
For example, this HTML tag opens a destination named "glossary" in a PDF file named myfile.pdf:
OR
Upvotes: 1
Reputation: 2002
this does work now as intended. try it or see Chromium issues 95176 and 144303.
Upvotes: 0