Thank you. This worked great for the docx.
But when using transformDocument and converting to PDF, the PDF numbering looks weird:
1 / 2
2 / 2
3 / 2 <-- weirdness
1 / 2
2 / 2
Same weirdness if using more pages.
I am using theese settings:
[transform] method = "libreoffice" path = "/usr/bin/libreoffice"