I'm looking for a way to get the Page ID of a confluence page.
There are already several solutions discussed here (e.g. see here:
Solved: Get/display Page ID - Confluence Internal Code)
But this solutions seem to work only for "non-headrevision" pages.
It appears, that the latest version of a page has always the same Page ID, so that ID seem to always address the "Head" revision of a page, regardless how often it is changed, what might be useful as well, but is in in this case not what I'm looking for.
My use case is, that I want to include the Page ID in a printout of a document (I know: archaic, don't ask me why...) , so it is possible to identify the exact version of the page printed by its page ID.
Quite often, this is the latest version of such page while printout, that might become updated with new information later on. It is important for me to later use the printout to identify the exact version of the printed page at any time in the future.
I already created a macro to include this information in the page but found, that this works only for "older"/"non head" versions of the page. Such pages show a static/unique Page ID that address a specific version of the page, while a printout of the latest version of the page (=> head version) shows an Page ID that dynamically addresses always the latest version of the page, so it is not possible to identify a specific page version that was the "head version" of that page while printout. OK, you can somehow figure out what page version was printed by looking at the page history and the print date... but that can't be the only solution here (at least I hope...)
Anny suggestions?
Thank you in advance!