[gs-devel] PDF rasterization for driverless printing: Color Management

Till Kamppeter till.kamppeter at gmail.com
Wed May 19 23:58:16 UTC 2021

On 20/05/2021 01:25, michael.vrhel at artifex.com wrote:
>> This I already do, I only need to verify whether the correct
>> -sOutputICCProfile="..." argument gets added to the GS command line and
>> I also have to let the output color space be Device... and not sRGB or
>> AdobeRGB then (printer must support Device... for that).
>> Only if there is no icm profile available and/or printer does not
>> support Device... I have to somehow make the decision between sRGB and
>> AdobeRGB. Here I would need to somehow examine the input file.
> So you are worried about a case where there is no ICC profile for the target device?  In this case, I would suggest you make a maximum ignorance assumption and just assume sRGB.   This was the original intent of this standard.

All devices have sRGB, but standards-conforming driverless IPP printers 
always tell whether they support AdobeRGB and/or DeviceRGB in addition 
or not.

>> Here I would like to know how to examine the input PDF file.
>> Ghostscript? Any other tools? QPDF?
>> I especially need to examine the input PDF to make the decision on
>> whether to use sRGB or AdobeRGB in the case the printer supports both.
> If the printer supports both, go with the larger gamut profile.

My printer supports both sRGB and AdobeRGB, does this mean I should 
select AdobeRGB?

>  There is no need to examine the contents of the input file.  Ghostscript will take care of the color management and ensure that the colors are well mapped to the target color space.   If there is an output intent in the PDF file, including -dUsePDFX3Profile will ensure the best emulation of that rendering to the target printer.

Can one pre-check on the file if this is the case before rendering it? 
And if yes, how?

> Just a quick question, are you expecting there to be an OutputItent in the incoming PDF file?   Other than in the graphics art community, I don't really see them very often.  Or is there some other aspect of this work flow that I am unaware of (i.e. some tool you are using is sticking in an OutputIntent).

99.9 % of the users are not in the graphics art community, they simply 
hit Ctrl+P in evince, LibreOffice, Darktable, RawTherapee, GIMP, .... So 
probably most PDFs have no output intent. Neither CUPS nor any of the 
filters of cups-filters add an output intent, most probably the GTK 
print dialog also does not add an output intent to the PDFs.

>> The "best" I want is the one with which I can expect the best output
>> quality for a given input file on a given printer (which can be
>> sRGB-only or in addition support one or both of AdobeRGB and
>> Device...+printer's ICC profile.
>>      Till
> Again, go with the largest gamut supported by the target device.  If you have no information use sRGB.

So if a printer supports sRGB and AdobeRGB this would be AdobeRGB?

And if a printer supports sRGB with 8 and 16 bit color depth and 
AdobeRGB with only 8 bit color depth, what to take for 
print-quality=high? sRGB 16-bit or AdobeRGB 8-bit?

For DeviceRGB one probably cannot tell whether the gammut is 
wider/narrower than sRGB or AdobeRGB, depends on the printer and its 
profile, so Device RGB one would only select if one has the printer's 
profile (probably not actually a "driverless" workflow as it requires a 
file which is specific to the printer, or more a graphics art community 
use case when DIY-calibrating the printer). Am I right?


More information about the gs-devel mailing list