Headless Writer PDF Export filter options format

Hello,

I have a script that converts DOCX files to PDF and I need to set filter options at run time. Therefore, I cannot modify what is in the registrymodifications.xcu file. Here is the command I used but it doesn’t pick up the resolution and quality values. It always pick up what is in the XCU file:

libreoffice --headless --convert-to pdf:“writer_pdf_Export:ReduceImageResolution=True;MaxImageResolution=75;Quality=50” MyDocument.docx

What did I do wrong? I’m using version 6.0.4.2 Linux 64 bits.

Thank you,
Phil

Currently there’s no way to pass these parameters through the command line. What could be done, however (if you have a finite number of possible configurations), is creating required variants of registrymodifications.xcu, and in script, copy the required file (or the whole profile, to avoid recreating profile at start) to a temporary directory, and run LibreOffice specifying the temp directory as user profile using the following parameter:

-env:UserInstallation=file:///path/to/temp-dir