Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-25903

Anchors in links confuse the PDF renderer, causes them them open in web browser instead of jumping within the PDF

      When exporting a space to PDF, links to pages will correctly jump to the relevant part of the PDF unless the link to the page also has an anchor to a specific part of that page. shaffenden investigated a bit and it seems that the '#' causes the renderer to make the link a full http://blah link, so when it's clicked on it opens in the user's web browser instead of going to that page and anchor within the PDF.

            [CONFSERVER-25903] Anchors in links confuse the PDF renderer, causes them them open in web browser instead of jumping within the PDF

            I also am searching for a solution to this problem. But I doubt that it has to do with the "#".

            My reasons:
            1) Links to anchors on the SAME page work without problem although they also include a "#"
            2) Having a look at the underlying html code there is no difference between a) links to other pages and b) links to anchors on other pages. But the result is that a) works and b) doesn't.
            3) When I link to another page (which normally works without a problem) but miss to include this page in my export then I get the same wrong result: Instead of creating a link within the PDF a click on the link causes the web browser to open.

            So I think that this specific combination of a link that a) goes to another page and b) has an anchor just can't be resolved properly. Hence the links are not included correctly into the PDF file. And opening the web browser instead seems to me like just some sort of fallback option.

            Just my thoughts. If someone knows better don't hesitate to correct me. Anything that gets us closer to a solution is fine with me.

            Steffen Heller added a comment - I also am searching for a solution to this problem. But I doubt that it has to do with the "#". My reasons: 1) Links to anchors on the SAME page work without problem although they also include a "#" 2) Having a look at the underlying html code there is no difference between a) links to other pages and b) links to anchors on other pages. But the result is that a) works and b) doesn't. 3) When I link to another page (which normally works without a problem) but miss to include this page in my export then I get the same wrong result: Instead of creating a link within the PDF a click on the link causes the web browser to open. So I think that this specific combination of a link that a) goes to another page and b) has an anchor just can't be resolved properly. Hence the links are not included correctly into the PDF file. And opening the web browser instead seems to me like just some sort of fallback option. Just my thoughts. If someone knows better don't hesitate to correct me. Anything that gets us closer to a solution is fine with me.

              shaffenden Steve Haffenden (Inactive)
              nmason Nick Mason
              Affected customers:
              5 This affects my team
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: