How to properly configure the No Print macro and a space's PDF Export Stylesheet to prevent the printing of the contents within the No Print macro?
Asked by JeffP:

* I used the following to configure this macro:

|      Field      |                              Value                               |
|-----------------|------------------------------------------------------------------|
| **Macro name**  | noprint                                                          |
| **Macro Title** | No Print                                                         |
| **Template**    | ``` ## @noparams&lt;div class="noprint"&gt;$body&lt;/div&gt; ``` |

* I used the following to configure the space's PDF Export Stylesheet: however, the contents within the No Print macro continues to be downloaded to a .pdf file.

<br />

<br />

```
div.noprint  {  display: none ;  }
```

*
  * I also tried using the following for configuring the space's PDF Export Styelsheet, but the contents within the No Print macro continued to be downloaded to a .pdf file

```
.noprint  {  display: none ;  }
```

* Any ideas what I should do to control the printing or no printing of the body content of the No Print macro?


Answers:
author: JeffP
body: To Whom It May Concern,

The problem definitely persists. The No Print macro config, page edit config, PDF Stylesheet config, and Export to PDF file are attached.

No Print Macro Configuration.png

Page Edit Screen.png

PDF Stylesheet Configuration.png

**Bottom Line**: The text within the No Print macro will not print at this time. I need to know what PDF Stylesheet config is needed to allow the No Print macro contents to be printed or not printed.

Many thanks for your timely assistance.  
[](https://community.atlassian.com/t5/Confluence-questions/How-to-properly-configure-the-No-Print-macro-and-a-space-s-PDF/qaq-p/146632?attachment-id=2022){#link_11894320b01636}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/24444/1/Page%20Edit%20Screen.png){#display_11894320b01636_0}  
[](https://community.atlassian.com/t5/Confluence-questions/How-to-properly-configure-the-No-Print-macro-and-a-space-s-PDF/qaq-p/146632?attachment-id=2023){#link_11894320b01636_0}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/24444/2/req86806-NewExpandPDFExport-041114-1013-104.pdf){#display_11894320b01636_2}  
[](https://community.atlassian.com/t5/Confluence-questions/How-to-properly-configure-the-No-Print-macro-and-a-space-s-PDF/qaq-p/146632?attachment-id=2024){#link_11894320b01636_1}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/24444/3/PDF%20Stylesheet%20Configuration.png){#display_11894320b01636_4}  
[](https://community.atlassian.com/t5/Confluence-questions/How-to-properly-configure-the-No-Print-macro-and-a-space-s-PDF/qaq-p/146632?attachment-id=2025){#link_11894320b01636_2}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/24444/4/No%20Print%20Macro%20Configuration.png){#display_11894320b01636_6}


author: Wayne Wong
body: Hi there,

Have you tried to use the macro directly from the page instead of adding it ad the stylesheet?

#### Using the 'NoPrint' Macro on a page {#toc-hId-1226803681}

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.

![](https://confluence.atlassian.com/download/attachments/336169496/NoPrint_body.png?version=1&modificationDate=1316412077676&api=v2)

If the problem persists, could you please provide us storage format of the an sample page, and the sample pdf?

Thank you.

Regards,

Wayne Wong


Tags: confluence-administration