LibreOffice Draw allows you to open a non PDF/A file and export this a PDF/A-1b or PDF/A-2b file.
The same is possible from the command line by calling on macOS
/Applications/LibreOffice.app/Contents/MacOS/soffice --headless \
--convert-to pdf:draw_pdf_Export \
--outdir ./pdfout \
./input-non-pdfa.pdf
or an a Linux simply
libreoffice --headless \
--convert-to pdf:draw_pdf_Export \
--outdir ./pdfout \
./input-non-pdfa.pdf
On the command line it is possible to tell the convert-to
to create a pdf and use LibreOffice Draw to do this by telling --convert-to pdf:draw_pdf_Export
.
Is there also a way to tell LibreOffice to produce a PDF/A document in headless mode?
The solution is the --headless option, which executes LibreOffice processes without launching the graphical user interface. For example, converting a document to EPUB is a pretty simple task in LibreOffice—but it's even easier with the libreoffice command: $ libreoffice --headless --convert-to epub example.odt.
No, LibreOffice will not convert a PDF to a DOC (or ODT) or so.
For PDF/A-1(means PDF/A-1b
?):
soffice --headless --convert-to pdf:"writer_pdf_Export:SelectPdfVersion=1" --outdir outdir input.pdf
Change the value from 1
to 2
for PDF/A-2, here is the Libreoffice source code Common.xcs, pdfexport.cxx and pdffilter.cxx.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With