How to create a page break function in Confluence to control pagination in PDF exports

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

This Knowledge Base article was written specifically for the Atlassian Server platform and may be self applied.

If you are an Atlassian Cloud customer this procedure cannot be performed due to application customization, which includes the creation of User Macros being unsupported: Functional differences in Confluence Cloud

Currently, Confluence does not have a Page Break function to control pagination in PDF exports.

An improvement request for this matter has been made:  CONF-28115 - Getting issue details... STATUS  

Feel free to vote for it if you would like to see the request implemented in the future.

In the meantime, Confluence users with System Administrator permissions are able to create a custom user macro for the same purpose. 

This article falls under the category of User Customization and is not supported by Atlassian.

Create A Custom User Macro:

  1. Go to "Configuration >> User Macros" in Confluence Administration
  2. Click "Create a User Macro"
  3. Enter the Macro Title field with a title that you will call this macro with
  4. Fill the rest of the field as per described below. In this example, the macro will be named "pagebreak"

    フィールド
    macroNamepagebreak
    表示方法Visible to all users in the Macro Browser
    マクロ タイトルpagebreak
    説明 Gives page break upon PDF export
    カテゴリConfluence Content
    アイコンの URLこのフィールドは空白のまま残すことができます
    ドキュメント URLこのフィールドは空白のまま残すことができます
    マクロ本文処理No macro body
    テンプレート

    テンプレート フィールドに以下のコードを入力します。


    ## @noparams
    <div style="page-break-before:always;"> </div>

  5. [保存] をクリックします。 

For more information about creating your own user macros, go to the following documentation:


Calling the new pagebreak macro on the page:

Now you can add the macro to your Confluence page by typing the macro name inside curly brackets. 

For example, if you have titled your macro as 'pagebreak', typing the following will automatically call the macro.

{pagebreak}

The macro should appear as so:

Upon exporting to PDF, page breaks will appear in the exported PDF where the macro is placed


最終更新日 2022 年 4 月 24 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.