How do I add my user macro all exported PDFs?
Asked by iamkelsishayla:

I have created the macro for last edited date and now I need to add it to all PDFs when exported for Audit purposes. How do I do that?

Is it in global config\>PDF stylesheet or something? I also have no idea about this type of stuff so a copy of exactly what to put and where would be helpful!


Answers:
author: iamkelsishayla
body: A colleague and I managed to sort it out using CSS. Thank you :)

comments: author: Philipp
body: Oh, that sounds great. Could you please tell me how you did that?

I'm searching now for hours but I can't find a solution for the same problem you had. I'm at the same point. Made a user macro for the lastmodifier content.

Thanks! :)


author: Aisling Natola
body: Could you let me know how you sorted this?

I am also trying to use my user macro on all exports for last date modified and version of page!

Thanks


author: Ivan Lima
body: Hey [@iamkelsishayla](/t5/user/viewprofilepage/user-id/2849778), to my knowledge, I believe you cannot include a [User Macro](https://confluence.atlassian.com/doc/writing-user-macros-4485.html) into the PDF layout, especially when your macro won't be part of the content of the pages and it handles dynamic information - which apparently is what you want to achieve.

In your case, once you mentioned you're not familiar with this type of customization, I recommend you to read the documentation [Customize Exports to PDF](https://confluence.atlassian.com/doc/customize-exports-to-pdf-190480945.html). Please note that this type of customization is limited to space exports
> Changes to the PDF layout only apply to space exports, not to single page exports (via \> Export to PDF).

I also recommend you to check out [Marketplace apps](https://marketplace.atlassian.com/search?product=confluence&query=PDF) such as Scroll PDF or Content Exporter. They will certainly make your life easier especially if you are new to CSS.

Well, that's my initial thought at least. I would be happy to hear what others have experienced with this type of customization/implementation.

Cheers.  
IL


author: Thomas Rough _K15t_
body: Hi [@iamkelsishayla](/t5/user/viewprofilepage/user-id/2849778) , as mentioned by [@Ivan Lima](/t5/user/viewprofilepage/user-id/1351762) if you do consider using an app for your export requirements, [Scroll PDF Exporter](https://marketplace.atlassian.com/apps/7019/scroll-pdf-exporter-for-confluence?hosting=server&tab=overview) (which we, K15t, develop) will allow you to style your PDF exports.

Specifically, the app will let you format the structure of your exports, for instance, by allowing you to add placeholders such as for the Last modification date. I believe this is what you require.

If you're interested you can read more about the placeholders that you can add to your custom export template [here](https://help.k15t.com/scroll-pdf-exporter/latest/server/scroll-placeholders-132330937.html). Furthermore, as you're probably aware you can trial app for free too from the Marketplace, so you can also easily evaluate if this would meet your needs.

Let me know if you have any questions.

Cheers, Thomas (K15t)


Tags: atl-gruland

confluence-server

server