Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-10815

Page-break macro for PDF export (Example implementation attached)

    XMLWordPrintable

Details

    • We collect Confluence feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      Being able to force page breaks in PDF output is very useful, and we've added this functionality via a user macro and a patch to xhtml2fo.xsl - it would be great if this or similar functionality was included in confluence so we don't have to continue to patch it ourselves.

      Our implementation requires two patches to xhtml2fo.xsl:

      In the attribute-set section

      	<!-- START pagebreak macro patch -->
          <xsl:attribute-set name="pagebreak">
              <xsl:attribute name="break-before">page</xsl:attribute>
          </xsl:attribute-set>
          <!-- END pagebreak macro patch -->
      

      In the templates

      <!-- START pagebreak macro patch -->
          <xsl:template match="html:div[@class='pagebreak']">
              <fo:block xsl:use-attribute-sets="pagebreak">
         
              </fo:block>
          </xsl:template>
          <!-- END pagebreak macro patch -->
      

      and a user macro to reference the templates (set to Macro generates HTML markup, no body)

      <div class="pagebreak">&nbsp;</div>
      

      Please consider adding this as a feature!

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              90abb4041f8b Anthony Frith
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: