XWiki.PDFClass can only be edited by some tricks (XWiki 9.11.2)

Hi - I want to report how to get PDF format change work.

If you want to change the layout of PDF output, you have after you to create XWiki.PDFClass and to add
an object XWiki.PDFClass to your template document.
To get a new PDF layout you have to do some changes in the textarea fields of XWikiPDFClass.
Major changes require changes especially within the fields xhtmlxsl and fopxsl.
If you enter xml-code (in SOURCE mode), very often it contains character sequence like “–” oder “)))” which
will be broken, if you open the object the next time as “)))” will be become “~)~)~)” and “–” vanishes.
It is obviously that the xml code won’t work any more.
The trick is to paste the original code in SOURCE mode (!) from somewhere every time you enter the editing window of PDFClass and do not change from source editing mode, but save it.

This is important if you want to modify the default of xhtml2fo.xsl.
css code rarely contains character sequences which will be automatically be escaped.

I think the limit of 60.000 characters of textarea mentioned somewhere in documentation is no longer valid
as I could work with the full input of xhtml2fo.xsl. (~100 KB)

(I learned a lot about debugging xwiki until understanding the effect.)

Best regards

Norbert

Thanks @NorSch for your feedback.

Also note that the doc for this is available at https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Configuration/#HCustomizingthePDFexportLook26Feel

hmm maybe the issue is that those fields use the WYSIWYG editor instead of the wiki editor. This needs to be checked.

Confirmed, I’ve just tested and I get:

I’ve opened Loading...

Thanks

@NorSch FYI I’ve added one line in the doc on https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Configuration/#HOverridetheCSSrules

For each property added, make sure to set the Content property metadata to PureText in order to not get the WYSIWYG editor which would make it complex to enter XML/XSL.

If you do this you should find it much simpler to edit and you won’t have any conversion issue.

Let me know if it helps.

YES - it helps. After changing the metadata of XWiki.PDFClass elements to PureText editing works as expected.

Thanks

Norbert