![]() ![]() A heading will be demoted by the value of its depth in the export tree. It is possible to calculate the amount by which a heading will be demoted in order to have the correct CSS styling applied. This will affect the application of custom PDF Stylesheets. This means that headings will be demoted. Due to the hierarchical manner in which a space is exported, Confluence will modify the heading elements to generate a uniform appearance for the entire space export. ![]() Your customization will appear in the PDF export.ĭemotion of heading elements: h1, h2, and so on. Then add a CSS rule to the PDF stylesheet. Therefore, the first step in customizing something is to find a selector for the HTML element produced by Confluence or the Confluence macro. The export engine works directly from the HTML output produced by Confluence. This includes fonts, tables, line spacing, macros, etc. You can use the stylesheet to customize the output of just about anything else that will influence the look and feel of the final document. To prevent the table of contents from being generated in your PDF document, add the div.toc-macro rule to the PDF Stylesheet and set its display property to none: To make changes to the appearance of the table of contents, define CSS rules in the PDF Stylesheet. To see the default CSS rules applied to the table of contents, download the default CSS rules ( confluencedefaultpdf.css) and examine the specific rules with toc in their name. Paste the link into the appropriate src="" attribute in your PDF Stylesheet as shown aboveĮdit the image URL so that it's relative by removing the first part of the URL before /download/.īy default, a table of contents will be generated after the title page, or at the beginning of the PDF document if no title page is defined in the PDF Layout. View the list of attachments on that page, then right-click the image and copy its location The "590719" in the src attribute is the ID of the page to which the image is attached.įollow these instructions to include an image on your title page: In the example above, the title page includes an image called "titlepage.png," centered in the middle of the page. To modify the page size to A4, edit the PDF Stylesheet to add a size property to the rule, like this: More information about paper sizes can be found on Wikipedia. If the server is located in Australia, the default paper size will be A4 (210 mm wide by 297 mm long). For example, if this server is located in the US then the default paper size of your PDF export will be US Letter (8.5 inches wide by 11 inches long). The default page size is based on the location of your Confluence server. You can also check out Advanced PDF Customizations. This section provides examples of typical customizations you can add. The PDF stylesheet field accepts Cascading Style Sheets (CSS) rules. Setting a global PDF StylesheetĪdd CSS to render the same content on each page. If no customizations are defined, the default CSS rules are applied.īy default, the export doesn't include a title page, headers, or footers. Any rule defined in this file can be customized and added to the PDF Export Stylesheet field. Your customizations override any default CSS rule. To get started, download the default CSS rules for the PDF stylesheet: confluencedefaultpdf.css. ![]() You can adjust the appearance of the PDF pages by customizing the CSS in the PDF Stylesheet field. You'll need space admin permission to do this.Īdd HTML to customize the Title, Header, and/or Footer. Select PDF export from the Look and feel card. You can enter HTML and CSS that will be rendered on the PDF title page, as well as page headers and footers. Select (Settings) in the Confluence navigation You can add your own HTML to customize the title page, page headers, and page footers in the PDF output. The PDF Stylesheet, where CSS is used to define the style of elements in the exported content, such as page size and margins, font, color, and list numbering.įor further customizations, see the Advanced PDF Export Customizations page. The PDF Layout, where HTML is used to define the structure of the exported content, including features such as the title page, headers and footers. To achieve a particular requirement in the exported PDF file, you make changes to the following: PDF customization only applies to space exports (not single page exports via PDF customizations are unique to each space PDF customizations use a combination of HTML and CSS ![]()
0 Comments
Leave a Reply. |