Ask Your Question
0

Headless Writer PDF Export filter options format

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

philip_c gravatar image

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

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

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

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
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

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

Seen: 369 times

Last updated: Jun 08 '18