[resolved] Pdf export - set the page size

So this is an answer:

1/ copy the default xsl transformation file (xwiki-platform/xwiki-platform-core/xwiki-platform-oldcore/src/main/resources/xhtml2fo.xsl at master · xwiki/xwiki-platform · GitHub) and place it into /usr/lib/xwiki/WEB-INF/classes/ directory (debian package version)

2/ customize whatever you need to change.

3/ restart tomcat.

It’s not ideal because I have to drop a file into the /usr/lib/xwiki directory and I need to remember that customization and I have to restart tomcat to get the servlet to recognize the change. However, it’s easy to do and is less hairy to me than editing an XWiki.PDFClass object.

(Hat tip to Use custom PDFTemplate by default for giving me the kick I needed to solve the problem on my own)