I recently upgraded from Ghostscript 9.54 to 10.04.
I was previosuly able to create valid PDF/A documents using the following arguments:
-dSAFER -dPDFA=1 -dBATCH -dNOPAUSE -dCompressPages=false ^
-r300 -sPAPERSIZE=a4 -dColorConversionStrategy=/RGB -dUseCIEColor ^
-sOutputICCProfile=srgb.icc -sDEVICE=pdfwrite ^
-dPDFACompatibilityPolicy=1
This worked even without having to specify a PDF/A definition file which was great, since then I did not have to manually play around in the definition file hardcoding paths to the ICC profile.
However, after upgrading to 10.04. I had to change some switches and now the PDF/A creation does not work anymore. I can get it to work using the PDF/A definition file, but I really hoped to finding a way around that.
The switches for Ghostscript 10.04 look like this now:
--permit-file-read= + C:/ ^
-sDEVICE=pdfwrite ^
-dPDFA=1 -dBATCH -dSAFER ^
-dNOPAUSE -sColorConversionStrategy=RGB ^
-dEmbedAllFonts=true ^
-dPrinted=true ^
-sProcessColorModel=DeviceRGB ^
-dPDFACompatibilityPolicy=1 ^
-dDetectDuplicateImages ^
-sOutputICCProfile=srgb.icc ^
-r300
Note that I had to switch the ColorConversionStrategy switch from '/RGB' to 'RGB' for it to run
I also suspect a change to the ColorConversionStrategy with GS 10.04 to be the reason for not creating valid PDF/As anymore.
My current call with Ghostscript 10.04. looks like this (it does not produce valid PDF/A with the same files that Ghostscript 9.54 did):
C:/.../gswin64c.exe --permit-file-read=C:/ ^
-sDEVICE=pdfwrite -dPDFA=1 -dBATCH -dSAFER ^
-dNOPAUSE -sColorConversionStrategy=RGB ^
-dEmbedAllFonts=true -dPrinted=true -sProcessColorModel=DeviceRGB ^
-dPDFACompatibilityPolicy=1 -dDetectDuplicateImages ^
-r300 ^
-sOutputICCProfile=C:/_Anwendungen/gs/gs10.04.0/iccprofiles/srgb.icc ^
-sOutputFile=C:\...\pdfTest4906731490839024183.pdf ^
C:\...\tempFile0_16335057974890705872
Sadly I did not find much documentation about the ColorConversionStrategy
switch except this blog article. In this it mentions which values are applicable for the parameter, however, I suspect it to be outdated and for GS 9.54.