Exporting to PDF / Word creates incorrect index tables

Issue #48 resolved
poposhka created an issue

Is this plugin capable of exporting the headers into an index? I tried exporting to Word, and it does not recognize the headers as index entries ("Error! No index entries found."). Exporting to PDF only creates one index, which is the title of the page I exported. Is there a way to get this working, or is it as intended?

Exporting multiple pages to PDF creates wrong header numbers in the index, but correct headers by your plugin (which is good), however, a subpage itself when viewed in confluence has the wrong numbering (starts at 1).

(Confluence 4.2.8)

Comments (9)

  1. Tomas Theunissen

    Hi, thanks for creating this issue!

    Could you clarify what you mean with 'index'? Some example Word documents or PDF's would help us too (even better when you have a version of what you get now and one with the expected results).

  2. poposhka reporter

    Actually, I jumped the gun on the Word problem - I can create a Table of Contents with no problems. However, when exporting to PDF (and this might be a shortcoming of confluence 4.2.8) it does not create a ToC that lists each section properly.

    If you export a single confluence page to PDF, it will only have one entry in the ToC: The page you exported.

    If I export a tree of pages it will have multiple entries, but they will follow the numbering of Confluence, giving the root page the index "1", any subpages the index "1.x" and so on. If my root page is using numberedheadings and has, say, the headings 1 through 10, the first subpage i create will continue the numbering (in the PDF) 11 through, say, 20 - but will be marked as 1.1 in the ToC. The following subpage will be marked as 1.2 in the ToC but will continue the numberedheadings from 21 and on.

  3. Tomas Theunissen

    It looks like you are depending on the ToC that you get when exporting multiple pages with the space export. This ToC is very limited and does not work well with Numbered Headings (unfortunately we cannot do anything about this). We recommend that you use the ToC macro instead.

    There are several ways to achieve the result that you want. We mostly create one page with the ToC macro and Numbered Headings and include all the pages we want exported in that one. You can then export that 'root' page and everything should work as expected.

  4. Christian Haugen

    I have seen the Master page being mentioned a few times, but I haven't understood what exactly it means. How do you include all the pages you want to export in one root page?

  5. Tomas Theunissen

    Hi Christian, you will have to edit the 'master' page and include other pages using the 'include' macro (this macro is included with Confluence).

  6. Christian Haugen

    Ok, I see it now. One more follow up question as I have a large tree structure underneath the main page that I want to export with correct numbering and toc. Do I then sequentially include every page that I want as the export? How does the master page know which pages are child pages?

  7. Tomas Theunissen

    Yes, you have to include all the pages in order that you want to see them in your export (the contents that you see when you view the 'master' page will be the same as your PDF export). The 'master' page does not need to know which pages are child pages. This because you are only exporting the 'master' page (which includes the pages you added).

  8. Log in to comment