As long ago as 6.3 the correct way to use Windows command line is through invoking Soffice
.com as that channels all command lines through the correct pathing. see current 7.6 manual comments.
Search for Run in the Windows Start menu.
Type the following text in the Open text field and click OK.
"{install}\program\soffice.com" {parameter}
Replace {install} with the path to your installation of LibreOffice software (for example, C:\Program Files\LibreOffice). Use soffice.exe instead of soffice.com, when you do not need console (e.g., you do not use command-line interface for headless operations).
So note that if you run a batch file all you need is the path prepended thus
set "path=C:\Program Files\LibreOffice\Program;%path%"
and soffice.com will be the default headless command to channel files via DRAW or calc etc.
Versions after 7.4 can convert PDF to PDF/A-1 or A-2 but PDF/A-3 was not added until later. So use current 7.6 or newer.
soffice --headless bla blah
where blah blah is https://help.libreoffice.org/latest/en-US/text/shared/guide/pdf_params.html
BEWARE the correct mix of external "
and internal \"
--convert-to "pdf:draw_pdf_Export:{\"SelectPdfVersion\":{\"type\":\"long\",\"value\":\"15\"}}" --outdir "folder name" "input.pdf"
"value" can be as below so for PDF/A-3b use number 3
1: PDF/A-1b
2: PDF/A-2b
3: PDF/A-3b
15: PDF 1.5
16: PDF 1.6
17: PDF 1.7 (same as default = 0)
The need for --outdir is to avoid risk of pdf overwrite of input.pdf, HOWEVER in the version I tested the outfile was renamed .'pdf
and needed rename !!
Tested with value = 2
Standard
PDF/A-2b
ISO Name
ISO 19005-2:2011
Conformance Level
Level b
Validity
PDF/A verification succeeded
Conformance is not always guaranteed, PDF/A-3 is excessively draconian. My first run with an old file produced a not unusual fail, which could more easily be fixed using Ghostscript.
Name of the processed file
TimeMachine1895.pdf
Validation status
This document has some validation errors
Result
Conformance level applied: PDF/A-3b
The PDF document conformance part does not match the selected validation conformance.
The PDF document conformance level does not match the selected validation conformance.
Document XMP metadata is missing.
Device dependent color space used without matching PDF/A OutputIntent.
However after a bit of head scratching I realised the file was not correctly completed due to a bad mix of "
and\"
escape character and on a re-run got
The file is a valid PDF/A-3B document
Process more files
File name(s):
TimeMachine1895.pdf