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

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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?

2 answers

1 accepted

3 votes
Answer accepted

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 Aug 21, 2019


Like # people like this
Stephanie Grice Community Manager 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 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:

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. 


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.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Confluence

What do you think is the most *delightful* Confluence feature? Comment for a prize!

- Create your own custom emoji 🔥 - "Shake for Feedback" on mobile 📱 - An endless supply of GIFs via GIPHY 🤩 Is there anything quite as nice as a pleasant surprise? Comment below with what...

402 views 23 8
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you