• Ryszard Lach
    Ryszard Lach, 2012/09/19 22:19

    Hi.
    It seems, that the export changes heading levels. I've created a document split in parts (at title1-title4 headings) and I've tried to combine them in one pdf and the resulting PDF has changed them, i.e. if in one xwiki document highest heading was title3, than in pdf it became title1.
    Can I have my original levels intact? Or, in other words, how to split a big document in parts wisely?

    TIA,
    R.

    • Anca Luca
      Anca Luca, 2012/12/06 18:39

      it's not by design, that's for sure. It might be a side-effect of something. In order to investigate further, can you tell me which values you used for the export parameters?

  • Ryszard Lach
    Ryszard Lach, 2012/12/09 12:16

    I've create a test case again, and it seems, that I've misunderstood what I've seen.
    Heading levels are intact, but every document (in my case: every chapter) appears in TOC (and in the pdf contant too) with it's own title. See an example:

    Pages:


    Name: MultiPagePDFExportTest
    Title: MultiPagePDFExportTest
    Content:
    = Title 1 =
    content


    Name: MultiPagePDFExportTestTitle2_1
    Title: MultiPagePDFExportTestTitle2_1
    Content:
    == Title 2 ==
    content of title 2


    Name: MultiPagePDFExportTestTitle3_1
    Title: blank
    Content:
    === Title 3 ===
    content of title 3


    Name: MultiPagePDFExportTestTitle2_2
    Title: MultiPagePDFExportTestTitle2_2
    Content:
    == Title 2 ==
    content of title 2

    Export invocation:

    #set($docsToExport = ['Sandbox.MultiPagePDFExportTest', 'Sandbox.MultiPagePDFExportTestTitle2_1','Sandbox.MultiPagePDFExportTestTitle3_1', 'Sandbox.MultiPagePDFExportTestTitle2_2'])
    $services.pdfexporter.export("My test pdf", $docsToExport)

    And the result (toc, sort of ascii-art)

    Table of Contents
    MultiPagePDFExportTest ............................................................................................................  3
    Title 1 ...........................................................................................................................  3
    MultiPagePDFExportTestTitle2_1 ....................................................................................................  3
      Title 2 .........................................................................................................................  3
    MultiPagePDFExportTestTitle3_1 ....................................................................................................  3
        Title 3 .......................................................................................................................  3
    MultiPagePDFExportTestTitle2_2 ....................................................................................................  3
      Title 2 .........................................................................................................................  3

    It would be nice to be able to omit the title of each (but first) document.

    • Anca Luca
      Anca Luca, 2017/09/05 15:58

       It would be nice to be able to omit the title of each (but first) document.

      Well, this looks like quite a specific use-case and I doubt that such a rule could have room in a generic tool like what this intends to be. 

      The purpose of this pdf export tool is to export a dynamic list of pages where all pages are "equal", they're just a collection of pages.
      If your usecase is about assembling a bigger document from its chapters which are divided in individual documents, you could actually create, as a wiki document, the document that represents the assembled document (using the include macro and/or display macro and custom headings when they're needed) and then export this assembled document using the standard XWiki export function. This way you can fine grain the hierarchy between the different sub-documents and also fully control the titles that appear in the table of contents. This works, of course, if you know all the documents you're including in the assembled document and you can handle that "statically".

Get Connected