Numbered headings in PDF (in TOC ***and*** body / content)

Issue #42 resolved
Guenter Huber created an issue

"You can also use Numbered headings when exporting to PDF..."

"Numbered Headings examples will be posted here soon!"

I´ve been referred here by Atlassian support, because their PDF numbered headings rather is an annoyance than a solution. It numbers the headings in the PDF TOC, but not in the body / content which is worse than not numbering at all, because customers report this as a bug.

I can find nothing but the claim here too. Don´t ask me how I feel!

Comments (35)

  1. Tomas Theunissen

    Hi Guenter,

    Thank you for raising this issue with us. I checked the PDF numbering in our instance and it works correctly (as you can see in the PDF I attached). Are you using the latest NH version?

  2. Guenter Huber reporter

    Thanks for your light speed support. It helps my mood with Atlassian support. <sigh> We got 2.3.4 installed on Confluence 5.1.3. I´m just trying to update it to 2.4.1.

    How can I switch the NH on or off in the PDF and how does it compare / interfere with Atlassians "solution"? Thx

  3. Guenter Huber reporter

    OK, just exported two pages from the Tools > Export to PDF menu and it worked like expected: no numbering and both TOC and body when page is bracketed with NH macro.

    How is this expected to work with space PDF export?

    Atlassian say numbering both (TOC and body) is a feature request, not a bug.

    Again: How do you co-exist / possibly interfere at the space level? (as opposed to page)

  4. Tomas Theunissen

    Numbered Headings continues numbering when exporting multiple seperate pages (all pages need to have the Numbered Headings macro though) by space export. The TOC is limited in this case and only numbers the headings on which the TOC macro is located. If the TOC get's fixed it automatically will work with Numbered Headings.

    A solution to this problem is to create a 'master' page which includes all the pages you want to export, add the TOC and Numbered Headings on this page. When you export the 'master' page you get all the includes numbered and a TOC with numbered references.

  5. Guenter Huber reporter

    If it´s too complicated to have the Atlassian numbering in the space export body the whole thing is useless, even counter-productive, because customers complain.

    Easiest thing would be to remove numbering completely, but they don´t seem to know. The issue has been open for 3.5 YEARS!

  6. Guenter Huber reporter

    I have the NH macro on half a dozen pages and the full space export is around 450 pages...

    I only bracketed the more complicated ones to give the users a better clue of the structure - as it´s almost impossible to distinguish level 3 to 6 headings.

    But you just made me aware that the NH bracketed pages do have local TOC and body numberings! So this would interfere with the Atlassian numbering in the global TOC!

  7. Tomas Theunissen

    If you want to have numbered headings on all pages, you should add the Numbered Headings macro to each page, or create a 'master' page as stated earlier.

  8. Guenter Huber reporter

    Thanks for the suggestion! I´ll want to tinker with it some time!

    I´d be most grateful for the time being (least effort, best result) if you´d know how I can get rid of the global Atlassian heading numbering in the TOC! (see TOC.png!)

    They / Support don´t / doesn´t seem to have a clue how to accomplish this. Thx!

  9. Tomas Theunissen

    You can disable the whole PDF space export TOC by adding the following CSS to the PDF stylesheet:

    div.toc {
    display: none;
    }
    
  10. Tomas Theunissen

    You could add the following CSS, but this keeps the indents:

    div.toclvl0:before { content:  ""; }
    div.toclvl1:before { content:  ""; }
    div.toclvl2:before { content:  ""; }
    div.toclvl3:before { content:  ""; }
    div.toclvl4:before { content:  ""; }
    div.toclvl5:before { content:  ""; }
    
  11. Guenter Huber reporter

    Great, Tomas, thanks a ton! I´ll share this with the community!

    Who do the Oranjes play on Friday? ;-)

  12. Guenter Huber reporter

    Thanks again for helping to squash the Atlassian bug / "feature" which noone had an answer for for 3.5 YEARS!

    But please fill in the void on the Numbered Headings samples pages!

  13. Gert-Jan van de Streek

    I think Oranges play Hungary on friday ;-)

    I updated the documentation tonight. I will add more examples as soon as I can and also elaborate a bit more on the pdf export and the toc usage.

  14. Guenter Huber reporter

    I wasn´t as fast with my review as you were with your help, but i finally got around to it after I won the two day wrestle with a Confluence bug. (includes the trash can content in a space export and thus fails with a primary key problem in the import)

    Thanks again! G.

  15. Gert-Jan van de Streek

    No problem, gathering reviews is traditionally always harder than gathering bug reports ;-) Very happy that you took the time!

  16. Martin Scheidel

    Hello,

    I am currently trying to reproduce your result, however I do not get the expected result yet.

    With numbered Headings, the numbering works ok, however I am at a loss how to generate a matching table of contents, also I would like to suppress the page titles in the PDF and start with the headings1 instead.

    Maybe it is the "master page concept" mentioned above I am not quite getting?

    Any help is appreciated, kind regards, Martin

  17. Martin Scheidel

    Hi Thomas,

    I did my own installation of confluence on linux with productive setup and postgresql even though it is but a test installation to verify if anything has improved sinde 5.1.5.

    kind regards, Martin

    PS: TestServer is on 5.4.4 with numbered headings 2.5.0

  18. Gert-Jan van de Streek

    Martin,

    Are you exporting the page via Tools > Export to PDF or via Browse > Space operations

  19. Gert-Jan van de Streek

    And what exactly is not matching currently? Are you in a position to send us examples ( the pdf / maybe a space export )?

  20. Martin Scheidel

    as described above: If I use only Confluence Functionality I get a document with numbering in the TOC, but not on the actual Headings. If I use Numbered Headings on every Page, I get a Document with numbers on its headings, however I get duplicate headings as the pagetitles are there anyway which are needed for the Confluence Toc. If I suppress these duplicate Headings, then I see no way to get a correct TOC.

    In Short: Can you perhaps provide a concise and complete HOWTO how to get a space export PDF document which contains correct numbering and no duplicate headings and a matching TOC for spaces with 3 layers of nested pages, because without this nesting, navigation would be a nightmare?

    kind regards, Martin

    PS: I can create a sample document if you like, but I believe the point should already be quite clear. I believe I either did: --> not understand what Guenter considered a solution --> not understand what Thomas means by "master Page" --> not understand the limitations of the described solution

  21. Gert-Jan van de Streek

    I just played with the pdf export for a couple of hours and I have to conclude that a toc with page numbering AND numbered headings AND suppressed page headings is close to impossible if your pages are on multiple levels (3 layers of nested pages like you say). The impossible part is suppressing the page title as that moves with the level of nesting.

  22. Gert-Jan van de Streek

    I have always wondered why this page title gets exported anyways, because it is not part of the content of a page.

  23. Gert-Jan van de Streek

    @fourstone maybe you can help me explore this a bit further by telling me how you suppressed the duplicate headings?

  24. Gert-Jan van de Streek

    Plus @fourstone it would still help if you attach a pdf that is as close as you can get, because I might still very well misunderstand what the exact problem is. There is so many ways to export and tweak the export that I might be looking in the wrong direction.

  25. Log in to comment