In older versions, there was a noprint macro that you could use to exclude content that you didn't want to be included in a PDF export.
How do we do this in the current Confluence version?
The fabulous @Thomas Schlegel once posted a user macro for this:
This macro should have a rendered body and the following Template:## @noparams<div class="NoPrint">$body</div>
Add the following to the PDF Stylesheet:
.NoPrint { display: none ; }
Put the content to be hidden in the body of the macro.
:-)
@Thomas Schlegel is fabulous, it's true!
@Thomas Schlegel
Which macro comes from you or where do I have to insert this code into Confluence? Is there a manual?
Hi @Simon Nimführ ,
as an administrator of Confluence, you can create user macros on your own (not for cloud instances, only for server).
I described creating user macros in an article some time ago:
https://community.atlassian.com/t5/Confluence-articles/The-Admin-s-tale-User-Macro-filtering-a-Confluence-table/ba-p/459369
It's another use case, but you can find the basics of creating a user macro there.
If you have more questions, don't hesitate to ask.
Hello,
I used "NoPrint" macro to hide content from confluence page. It works fine when I try to hide certain sentences, but, when I try to hide the entire section, the PDF that gets generated hides the content, but, in the ToC, the section title is added with page number marked as 0. This looks very weird. Is there a fix for this? I do not need the section title that is marked to be hidden to show up in ToC. Thanks.
Hi @Thomas Schlegel
I'm using confluence data center version 7.13.7. Can I use the no print macro? please confirm. Also, I have the administrator rights, but Im not sure whewre to create the macro, as you have mentioned in the below page. https://community.atlassian.com/t5/Confluence-articles/The-Admin-s-tale-User-Macro-filtering-a-Confluence-table/ba-p/459369
Thank you
Hi @Meera_Amanullah ,
please check Atlassians documentation: https://confluence.atlassian.com/conf713/writing-user-macros-1077914347.html
Hi
Im not able to find General Configuration, in my Confluence interface. Im using confluence data center version 7.13.7, can you please confirm, the steps mentioned in the below link is applicable to my version.
https://confluence.atlassian.com/conf713/writing-user-macros-1077914347.html
When you see the cog in the top right corner between the question mark and the bell, click it and choose the first option.
If you don't see the cog, you are not a Confluence Admin. Only Confluence admins can set up user macros. Contact yours in this case.
Not sure if this is still relevant, but I needed this requirement myself, so decided to build a Macro plugin for Confluence
https://marketplace.atlassian.com/apps/1235840
It looks like you're new here. Sign in or register to get started.