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 macro

To create the 'NoPrint' user macro:

  1. Choose the cog icon  at top right of the screen, then choose Confluence Admin.
  2. Choose User Macros in the left-hand panel.
  3. Choose Create a User Macro at the bottom of the list of macros.
  4. 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>
  5. 保存を選択します 。

(warning) The information on this page does not apply to Confluence OnDemand.

ページでの 'NoPrint' マクロの使用

マクロ ブラウザーを使用いて、Confluence ページにマクロを追加できるようになりました。マクロ プレースホルダーの本文に入力れたテキストは印刷されませんが、ページをオンラインで閲覧したときに表示されます。

Making the PDF export recognise the NoPrint macro

See Advanced PDF Export Customisations.

  • ラベルなし