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

前端 未结 5 1348
灰色年华
灰色年华 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 09:05

    Please note that current answers are not completely correct. You can define which level of PDF/A you want, resulting in different behaviors of the program. This one is correct:

    gs -dPDFA -dBATCH -dNOPAUSE -sColorConversionStrategy=UseDeviceIndependentColor -sDEVICE=pdfwrite -dPDFACompatibilityPolicy=2 -sOutputFile=output_filename.pdf input_filename.pdf
    

    Please note my change from sdPDFACompatibilityPolicy to dPDFACompatibilityPolicy. Change it to a higher number to get other versions. 1 is good if you don't need DOCINFO. Furthermore we use the option UseDeviceIndependentColor to avoid validating issues.

    If you change options here, you will most likely get a non compliant PDF/A (even if it stated differently). You can check your pdf/a here: https://www.pdf-online.com/osa/validate.aspx

提交回复
热议问题