Command-line PDF-export options ("soffice --convert-to pdf") ?

Hello,

With UNO it's possible to set the PDF-Export's filter options before doing the actual PDF export, like for example set "PDF/1a" format, "No (Jpeg) compression", etc. Here's the list:
https://wiki.openoffice.org/wiki/API/Tutorials/PDF_export#General_properties

How to do the same thing with Libreoffice being called from the command-line with the parameter "--convert-to pdf" ? The "--help" message says:

--convert-to pdf:writer_pdf_Export[:output_filter_options]

Unfortunately, I don't find these mentioned ":output_filter_options". Does anybody know them?

If I knew C++ in large projects better, I would dare to look at Libreoffice's source-code (and I did so), but it's very Greek to me.

Aurelius

With UNO it's possible to set the PDF-Export's filter options before
doing the actual PDF export, like for example set "PDF/1a" format, "No
(Jpeg) compression", etc. Here's the list:
https://wiki.openoffice.org/wiki/API/Tutorials/PDF_export#General_properties

How to do the same thing with Libreoffice being called from the
command-line with the parameter "--convert-to pdf" ? The "--help"
message says:

--convert-to pdf:writer_pdf_Export[:output_filter_options]

Unfortunately, I don't find these mentioned ":output_filter_options".
Does anybody know them?

Those filter option arguments got added as a fix for <https://bugs.documentfoundation.org/show_bug.cgi?id=36313> "CLI: Encoding issue when Converting documents: esp. UTF-8 in headless mode." However, their usage is rather awkward, as you need to have intimate knowledge about the individual filters' arguments, and how each filter's code expects those arguments to be encoded as a string. See comment <https://bugs.documentfoundation.org/show_bug.cgi?id=36313#c17> for an example for Calc's CSV filter.

If I knew C++ in large projects better, I would dare to look at
Libreoffice's source-code (and I did so), but it's very Greek to me.

I fear there's no way around somebody interested in this topic picking this up, reading the source code and writing documentation for the various filters what the filter option strings should look like.

Thank you Stephan for your good hints, as usual.
Then I'm trying to examine the source-code a bit closer. But this could take some time, since it's been a long time when I learned C... :slight_smile:

Aside this, the "soffice --convert-to pdf" approach works very fine so far.

Aurelius

[..]