Confluence Latest : NoPrint Example of a User Macro
This page last changed on Aug 15, 2012 by smaddox.
This page gives an example of a user macro, the 'NoPrint' macro, that you can use to prevent text from being printed. For full details about creating a user macro, see the guide to writing user macros. Defining the 'NoPrint' user macroTo create the 'NoPrint' user macro: - Choose the cog icon
at top right of the screen, then choose Confluence Admin. - Choose User Macros in the left-hand panel.
- Choose Create a User Macro at the bottom of the list of macros.
- Enter the macro attributes as follows:
- Macro Name:
noprint - Visibility:
Visible to all users in the Macro Browser - Macro Title:
NoPrint - Description:
Hides text from printed output. - Categories:
Confluence Content - Icon URL: You can leave this field empty.
- Documentation URL: You can leave this field empty.
- Macro Body Processing:
Rendered
Template:
## @noparams
<div class="noprint">$body</div>
- Choose Save.
| |
Using the 'NoPrint' Macro on a page
Now you can add the macro to your Confluence page using the Macro Browser. Text entered into the body of the macro placeholder will not be printed, but will appear when the page is viewed online.

Making the PDF export recognise the NoPrint macro
See Advanced PDF Export Customisations.