Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,556,352
Community Members
 
Community Events
184
Community Groups

Exclude Content from PDF Export

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?

3 answers

1 accepted

6 votes
Answer accepted
Nicolai Sibler
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Aug 21, 2019

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
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Aug 21, 2019

:-)

Like # people like this
Stephanie Grice
Community Manager
Community Managers are Atlassian Team members who specifically run and moderate Atlassian communities. Feel free to say hello!
Aug 21, 2019

@Thomas Schlegel is fabulous, it's true! :) 

Like # people like this

@Thomas Schlegel 

Which macro comes from you or where do I have to insert this code into Confluence? Is there a manual?

Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Aug 29, 2019

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. 

Like Florian Loikasek likes this

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.

Like Josh Simnitt likes this

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

Nicolai Sibler
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 11, 2023

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

Nicolai Sibler
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 11, 2023

When you see the cog in the top right corner between the question mark and the bell, click it and choose the first option.

grafik.png
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.

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events