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.
:-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Thomas Schlegel is fabulous, it's true! :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Which macro comes from you or where do I have to insert this code into Confluence? Is there a manual?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not sure if this is still relevant, but I needed this requirement myself, so decided to build a Macro plugin for Confluence
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Meera.Amanullah ,
please check Atlassians documentation: https://confluence.atlassian.com/conf713/writing-user-macros-1077914347.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the input. I found the administrator and got the macro created.
Could you please let me know, if there is any specific location where I need to place the text ".NoPrint { display: none ; }" on the stylesheet.
Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.