I need to merge multiple PDF files which are in the PDF/A format (used for long-term archiving). The input files are all PDF/A-1a documents created with LibreOffice Writer, and the merged output must be exact same format. Lossless merging is preferred. Is this possible?
Related question here, with the results of my trial and errors so far below:
pdf-shuffler
Produces lossy PDF-1.3 output.
pdftk
/pdfchain
Produces lossy PDF-1.4 output.
Ghostscript/gs
Produces lossy PDF-1.7 output.
pdfunite
(from poppler-utils
) Produces lossy PDF-1.4 output.
convert
(from imagemagick
) Produces very large files with extremely lossy PDF-1.4 output.
Using this method with the LibreOffice GUI I am able to export PDF/A files, however the quality is degraded and SVG graphics are rendered incorrectly.
libreoffice
outputs .ps files and fails with many error messages in the console. libreoffice --headless --print-to-file FILE1.pdf FILE2.pdf MERGED.pdf
(I'm probably using this command incorrectly...)