How to create PDF/A files with --export-to command line options

I need to create PDF/A documents from .odt writer files.

https://wiki.openoffice.org/wiki/API/Tutorials/PDF_export documents the pdf export filter (as it was eons ago, I guess). I’ve got it working with other options, such as setting a password, e.g.

soffice --headless --convert-to 'pdf:writer_pdf_Export:{
“EncryptFile”:{“type”:“boolean”,“value”:“true”},
“DocumentOpenPassword”:{“type”:“string”,“value”:“mypassword”},
“Printing”:{“type”:“long”,“value”:“2”},
“EnableCopyingOfContent”:{“type”:“boolean”,“value”:“true”},
“EnableTextAccessForAccessibilityTools”:{“type”:“boolean”,“value”:“true”}
“SelectPdfVersion”:{“type”:“long”,“value”:“1”}
}
’ --outdir /tmp/outdir source.odt

This woks, except the result is not PDF/A despite the
“SelectPdfVersion”:{“type”:“long”,“value”:“1”}

This can be seen by running cpdf -info output.pdf, which shows no “Subformat”. This is unlike with files exported interactively from LibreOffice where the Subformat shows PDF/A-xx

What is the correct way to specify this?

I can’t help with the details but the current wiki is API/Tutorials/PDF export - The Document Foundation Wiki

Yours doesn’t look wrong (except for the messed up quotes), but I don’t see a , in front of your last parameter SelectPdfVersion. Maybe the json-parser skips the following…

Help on this is here:
https://help.libreoffice.org/latest/en-US/text/shared/guide/pdf_params.html

What shell/OS do you use? Check the hints on quoting in above help.

Background:

MikeKaganski implemented this in 7.4