Comments on XWiki Multipage PDF Export
Last modified by Admin on 2022/02/28 00:24
Choose the export format from the list below:
Export as Portable Document Format (PDF) using the Web Browser
Export as HyperText Markup Language (HTML)
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.
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?
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:
$services.pdfexporter.export("My test pdf", $docsToExport)
And the result (toc, sort of ascii-art)
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.
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".
Hello!
Install error:
Failed to get fields for class [org.xwiki.pdf.multipageexport.internal.XslFopPdfExporter] because the class [com/xpn/xwiki/pdf/impl/PdfExportImpl] couldn't be found in the ClassLoader.
Can you help me, please?
If you tried it in 9.11 it's a regression that has been fixed and will be part of 9.11.1. See https://jira.xwiki.org/browse/XWIKI-14945 for more details.