How to use ghostscript to convert PDF to PDF/A or PDF/X?

前端 未结 5 1340
灰色年华
灰色年华 2020-12-02 08:07

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. Wha

5条回答
  •  臣服心动
    2020-12-02 08:47

    @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:

    • http://svn.ghostscript.com/ghostscript/trunk/gs/doc/Ps2pdf.htm#PDFA

提交回复
热议问题