It's not possible to use the HTML headings (<h1>, <h2>, <h3>...) for auto numbering titles of PDF files generated by Space Tools > PDF Export.

XMLWordPrintable

    • 5
    • Severity 3 - Minor
    • 0

      NOTE: This bug report is for Confluence Server. Using Confluence Cloud? See the corresponding bug report.

      The following CSS Stylesheet can be used in Confluence Space Tools > Look and Feel > PDF Stylesheet to generate an export in PDF from the entire space where each PDF page will have it's title numbered according the Space page level in the Space Page Tree.

      body {
          counter-reset: counterH1;
      }
      h1:before 
      {
          counter-increment: counterH1; 
          content: counter(counterH1) ". ";    
      }
      h1 
      {
          page-break-before: always;
          counter-reset: counterH2; 
      }
      
      h2:before {
          counter-increment: counterH2; 
          content: counter(counterH1) "." counter(counterH2) ". ";  
          
      }
      h2 
      {
          page-break-before: always;
          counter-reset: counterH3; 
      }
      
      h3:before 
      {
          counter-increment: counterH3; 
          content: counter(counterH1) "." counter(counterH2) "." counter(counterH3) ". ";  
      }
      h3 
      {
          page-break-before: always;
      }
      

      For no apparent reason it does not work as expected.
      The pages are erroneously numbered.

      Here's one example:
      The following Page Tree

      Generate the following numbering

      I'm not sure if it's related with another problem, so I'm submitting this new bug.
      Thanks!

        1. ConfPageTree.png
          ConfPageTree.png
          10 kB
        2. PDF_Numberings.png
          PDF_Numberings.png
          40 kB

            Assignee:
            Unassigned
            Reporter:
            Andre Borzzatto (Inactive)
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: