Adding the "page ID" into a PDF export or into the related page
Asked by Ed Schreibman:

Hi - I know a similar question has been posted multiple times, and I've reviewed the below resources but the do not seem to address my needs.

In a nutshell, I've an external document which provides a crosswalk from Statements to a confluence "page ID".

I'd like to be able to provide a PDF export with the "Page ID" either in each page itself or in the PDF export. This way, someone can simple Control-F and find the "page ID" for a page.

I see the "title"_"page ID" is added to each html file in an export, but sending a single PDF out is preferred.

Is there a way to add the "page ID" into the page footer in the PDF export?

or

Is there a way to add the "page ID" into its respective page?

For clarity , this "12345678" is the number I'm looking for .../pages/12345678/... to be in the pdf export.

Pages I reviewed:

<https://confluence.atlassian.com/doc/export-content-to-word-pdf-html-and-xml-139475.html>

<br />

<https://support.atlassian.com/confluence-cloud/docs/customize-exports-to-pdf/>

<https://community.atlassian.com/t5/Confluence-questions/Adding-URL-to-Footer-for-PDF-export/qaq-p/1462723>


Answers:
author: I_A
body: Do you maybe have a list with possible user macros ?

Best regards and thank you


author: Matteo Gubellini _SoftComply_
body: Hello [@Sana_Iqbal](/t5/user/viewprofilepage/user-id/5250710) ,

The page ID is taken directly from Confluence and cannot be modified unfortunately.

Matteo


author: Sana_Iqbal
body: Hello [@Matteo Gubellini _SoftComply_](/t5/user/viewprofilepage/user-id/641360)

I hope this message finds you well. I am reaching out regarding the use of SoftComply Toolbox. Is it possible to add a custom format to the page ID? For instance, we would like to incorporate a page ID such as 'KSA-101,' where 'KSA' represents our page category.

If this is achievable, could you please inform me of the steps involved? Alternatively, if there is another solution available, I would greatly appreciate your guidance.


author: Matteo Gubellini _SoftComply_
body: Yes you have to add it to each page.

The sky is the limit (sort of) for user macros. You can create them yourself or ask around.

Matteo


author: I_A
body: Thank you, but for this I need to add that macro to every single page , right ?

Is it not possible to create a PDF export template , that adds those values automatically to the pdf ?


author: Matteo Gubellini _SoftComply_
body: Just create a new User Macro with the following code:

```
## @noparams
$content.Id
```

![Screenshot 2023-03-06 113952.png](https://community.atlassian.com/t5/image/serverpage/image-id/243949i43CFEF66550CD222/image-size/large?v=v2&px=999 "Screenshot 2023-03-06 113952.png")


author: Matteo Gubellini _SoftComply_
body: Ah, ok, this was for cloud. Let me check if we have a custom macro for it.


author: I_A
body: Is there a possibility to do this native with confluence ? Server doesnt support any new apps


author: Matteo Gubellini _SoftComply_
body: It's a free app now with some more stuff.

Please note that there is an Atlassian bug where the inline version does not export to PDF.

[SoftComply Toolbox](https://marketplace.atlassian.com/apps/1229624/softcomply-toolbox-for-confluence?hosting=cloud&tab=overview)

Matteo


author: I_A
body: Hey Matteo

could you share it with me too please

thank you


author: Matteo Gubellini _SoftComply_
body: Hi Ed,

I put together a simple macro to embed it into the page itself. I can share it with you.

Matteo


Tags: cloud

confluence-cloud

pdf