I'm converting a pdf 1.5 file via. the latest Ghostscript cli to pdf/a-3 format, but by validating the output file with VeraPDF, I get an error.
I used the command:
gswin64 -dPDFA=3 -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -dPDFACompatibilityPolicy=1 -sColorConversionStrategy=UseDeviceIndependentColor -sOutputFile=output.pdf input.pdf
"DeviceRGB shall only be used if a device independent DefaultRGB colour space has been set when the DeviceRGB colour space is used, or if the file has a PDF/A OutputIntent that contains an RGB destination profile."
VeraPDF validation error 6.2.4.3
What could be wrong here (with the commands?)?
The solution was to upgrade to Ghostscript 10.3.0 and use of this command:
-sDEVICE=pdfwrite -o good.pdf -sColorConversionStrategy=RGB -dCompressPages=false -dWriteObjStms=false -dWriteXRefStm=false -dPDFA=3 --permit-file-read=/ghostpdl/iccprofiles/default_rgb.icc pdfa_def.ps input.pdf
with an icc-profile defined in pdfa_def.ps as:
% Define an ICC profile :
/ICCProfile (/ghostpdl/iccprofiles/default_rgb.icc) % Customise
def
as described here: