PDF export - some links point back to Confluence instead of within PDF

I have a set of pages within a space that I want to export to PDF, and I want the Confluence links to be links within the PDF document.  Each of the Confluence pages have either "include excerpt" or "include page" on them.  The only links that work as expected (convert to link within the PDF), are links to content on same Confluence page/excerpt.  For the Confluence pages that have links within same excerpt, the links convert to PDF as expected.  For the Confluence pages that have links to content within a different excerpt, the link goes to Confluence page instead.  When I export to PDF, how do I get the links to convert to stay within the PDF document instead of pointing back to the Confluence page?

10 answers

Very tricky. I have had problems with links for years and already posted a similiar questions: Problem with anchor hyperlinks after upgrade (from 3.x to 4.3.2)

In short: A combination of links with anchors and nested pages does not work too well.

I ended up changing my approach.  Within a single SPACE, I put all my pages under a page called INCLUDE LIBRARY.  Outside of the INCLUDE LIBRARY, but within the same SPACE, I created a single page (let's call it the HOME page) that only had 1) table of contents, and 2) several lines of "Excerpt Include" and "Include Page" of pages and excerpts from the INCLUDE LIBRARY.  I still used LINKS and ANCHORS, however I did not use a page reference on the LINKs; only #<anchorname>.  When the HOME page is viewed, it appears to be a single page.  For the PDF export, the only page I had to export was the HOME page.  All of the links worked smile.  YAAAAAAAAAAAAAAY!

The include-approach has some advantages, but also some substantial disadvantages, as far as I can see. The most obvious drawback when it comes to PDF-export is the fact that there are no bookmarks generated, no outline you can use to navigate the PDF. Also the performance is pretty bad, if you include many, maybe hundreds of pages. For me this is a workaround, but not a solution for this issue.

Cool thing! That is more or less the same I am doing.

The drawback (if you will) is that the anchor links don't work if you go to one of the included pages directly. So either way there is something missing.

The main point for me is that with this approach I can export with one click and I can use the {toc} macro instead of the standard toc and so I can create a toc from headings instead of page names and avoid Confluence's page name limitations, see Not able to create a page with the same title as another page.

 

Do I understand that right:

This issue is related to the usage of "include page" macros.
There is no known bug with links in exported PDF as long as I don't use include, right?

Thanks a lot.

Hi @Reto Weiss

no, it is a bit different...

To get more information you can read the following bug reports (among others):

https://jira.atlassian.com/browse/CONF-23324

https://jira.atlassian.com/browse/CONF-25903

https://jira.atlassian.com/browse/CONF-24624

 

As I already mentioned in the comment above, there is currently no workaround for this issue. The include-approach doesn't work for me, hance I have to live with the fact that links to anchors simply do not work, in exported PDF.

@Reto Weiss: Don't give up too soon. The first bug reports about this are less than 4 years old :S

I wonder whether the PDF converter I am testing these days could help with that?

Let me know your findings. I still have to live with the fact that anchor links to other pages do not work in PDF, quite a nasty limitation and not what you would expect of a mature product.

I have this problem with links created in Confluence.

I use the GUI to search then select the target page. I also tried selecting from Recently viewed. I'm not using any include page macro, and the error occurs both in Chrome and in Firefox.

The code for the link looks like this:

  <ac:link>
    <ri:page ri:content-title="My page title"/>
  </ac:link>

The error message is
Adobe Acrobat does not allow connection to :"my.domain.com"

I also have a table of contents that does work.

I have this problem with links created in Confluence in a PDF export.

The error message is
Adobe Acrobat does not allow connection to :"my.domain.com"

To create the links, I use the GUI to search then select the target page. I also tried selecting from Recently viewed. I'm not using any include page macro, and the error occurs both in Chrome and in Firefox.

The code for the link looks like this:

  <ac:link>
    <ri:page ri:content-title="My page title"/>
  </ac:link>

I also have a table of contents that does work.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Sarah Goff-Dupont
Published 4 hours ago in Confluence

Think you know shares vs. @mentions in Confluence? Take this collab quiz.

To anyone who doubts that Atlassians are a little too obsessed with collaboration, and tools related thereto, let me describe a recent discussion we had (which took place on our internal Confluence, ...

54 views 2 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you