Ask Your Question

Headless Writer PDF Export filter options format

asked 2018-06-07 20:58:21 +0200

philip_c gravatar image


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 Linux 64 bits.

Thank you, Phil

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2018-06-08 02:08:08 +0200

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:

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-06-07 20:58:21 +0200

Seen: 476 times

Last updated: Jun 08 '18