This article is meant to help you creating page to page embedded links with page numbers for PDF export.
Step-by-step guide
I use the following page hierarchy:
You can find all related documentation in the button of this page.
Pre-requisites
Administrators only!
Please note that you have to have administrator rights in order to carry out the below steps.
Create or modify a Custom stylesheet using the following CSS code:
a.embedded-page-link::after{ content: "("target-counter(attr(href), page, decimal)")"; }
- Create a user macro with the following settings:
Create link
I would like to create a link on the "Embedded link Home" page what links a table at "Another page in the export" page. I need to do the following steps:
- Edit "Another page in the export" and add an anchor tag next to the table:
- Edit "Embedded link Home" and insert the user macro here:
Add a link to the editable field with the page name and with the Anchor name:
Link: <Page name>#<AnchorName>
Link text: Any text what you want to see on the page
The final result:
Print settings with Content Exporter
- Go to your first exportable page (in my case this is "Embedded link Home")
- In the page menu → Export to PDF
- Customize for this export
- Stylesheet (CSS) → Edit
- Select your custom stylesheet what you created during the preparing.
- Save your settings with clicking on Apply
- Select content as you desired (I selected the "Current page with all child pages" option).
- Export
Change result
Change the text on your confluence page:
Change the Linked text in the User macro's editable field.
Change the exported text in the PDF:
Actually the export result is: (<page number>)
To change this you need to change your Custom css style. Here are some example how can you do that:
a.embedded-page-link-see::after{ content: "See on page: " target-counter(attr(href), page, decimal); } a.embedded-page-link-check::after{ content: "Check " target-counter(attr(href), page, decimal) " page."; }
Related articles