How to convert jpeg to PDF/A?

2.4k views Asked by At

I want to convert jpeg file to PDF/A, because lob.com requires PDF/A format. https://www.lob.com/docs#prepping

I use imagemagick for converting this, and is this PDF/A formatted file?

$ pdfinfo ~/Desktop/foo.pdf
Title:          foo
Producer:       ImageMagick 6.8.7-7 Q16 x86_64 2013-12-03 http://www.imagemagick.org
CreationDate:   Tue Jan  7 09:56:05 2014
ModDate:        Tue Jan  7 09:56:05 2014
Tagged:         no
Form:           none
Pages:          1
Encrypted:      no
Page size:      640 x 1136 pts
File size:      93239 bytes
Optimized:      no
PDF version:    1.3

How can I convert jpeg file to PDF/A formatted pdf?

1

There are 1 answers

1
ThatOneDude On BEST ANSWER

Now that you've got it as a non-PDF/A pdf file you can use ghostscript to convert the PDF to PDF/A with the -dPDFA option.

Something like:

gs \
    -dPDFA \
    -dBATCH \
    -dNOPAUSE \
    -dNOOUTERSAVE \
    -dUseCIEColor \
    -sDEVICE=pdfwrite \
    -sOutputFile=out-a.pdf \
     PDFA_def.ps \
     ~/Desktop/foo.pdf

Should work provided you have a properly defined PDFA_def.ps

See unix stackexchange for a related question.