views:

505

answers:

3

Is there a way to use ghostscript to convert PDF to PDF/A or PDF/X? I know it can be used to convert PDF to images, but I don't know if it can be used to convert PDF/A. What parameters should I use?

+1  A: 

Is the ghostscript documentation on ps2pdf for PDF/X and PDF/A any help?

danio
A: 

Thank you, big help.

imgen
A: 

@danio, @imgen: Even recently released documentation pages on PDF/X (standardized Prepress requirements) and PDF/A (standardized Archiving requirments) generation were quite misleading. (Your link pointed to a v8.63 release.) In the end, it suggested that running the example commandlines using the sample PDF*_def.ps would already generated valid PDF/A and PDF/X files.

But, they do not!

Here is one of the sample commands, which by itself is correct:

  gs \
    -dPDFA \
    -dBATCH \
    -dNOPAUSE \
    -dNOOUTERSAVE \
    -dUseCIEColor \
    -sDEVICE=pdfwrite \
    -sOutputFile=out-a.pdf \
     PDFA_def.ps \
     input.ps

The output file will declare itself to be PDF/A (and most PDF viewers would happily go along with this), but the output file fails all real compliance tests.

The fix is easy: you need to edit your sample PDFA_def.ps (for PDF/X: your PDFX_def.ps) files to match your environments. These required edits were not clearly spelled out in older documentation versions, and the provided command suggested it would work out of the box.

Especially in case of PDF/X you MUST specifiy a valid ICC profile to use.

See also the updated documentation (current SVN trunk version) about this:

pipitas