Uploaded image for project: 'Confluence Cloud'
  1. Confluence Cloud
  2. CONFCLOUD-54336

Allow PDF Export TOC to be replicated via PDF Stylesheet

    XMLWordPrintable

    Details

      Description

      When exporting a space via PDF, applying a custom style-sheet only allows you to create a table-of-contents style numbering for contents within a page.

      When the same stylesheet is applied to the page titles and their hierarchy within a space, the sub-level entries are reset to zero:

      PDF Export example:

      Source Space example:

      Custom style-sheet:

      body {
              counter-reset: h2counter 0;
          }
          h1 {
              counter-reset: h2counter 0;
          }
      
          h2:before {
              content: counter(h2counter) ".\0000a0\0000a0";
              counter-increment: h2counter;
          }
          h2 {
              counter-reset: h3counter 0;
         }
      
          h3:before {
              content: counter(h2counter) "." counter(h3counter) ".\0000a0\0000a0";
              counter-increment: h3counter;
          }
          h3 {
              counter-reset: h4counter 0;
          }
      
         h4:before {  
             content: counter(h2counter) "." counter(h3counter) "." counter(h4counter) ".\0000a0\0000a0";  
             counter-increment: h4counter; 
         }
         h4 {
             counter-reset: h5counter 0; 
         }
        
         h5:before {  
             content: counter(h2counter) "." counter(h3counter) "." counter(h4counter) "." counter(h5counter) ".\0000a0\0000a0";  
             counter-increment: h5counter; 
      }

      The expectation is ToC styling should be available to style-sheet customisation within Confluence.

        Attachments

        1. CE-090514-1138-28.pdf
          4 kB
        2. css_source_example.jpg
          css_source_example.jpg
          219 kB
        3. pdf_export_example.jpg
          pdf_export_example.jpg
          130 kB

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            pgreig Paul Greig
            Votes:
            24 Vote for this issue
            Watchers:
            16 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: