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

Jonas Smedegaard jonas at jones.dk
Wed May 19 12:55:47 UTC 2021

Quoting Till Kamppeter (2021-05-19 12:53:22)
> On 19/05/2021 10:02, Jonas Smedegaard wrote:
> >> What I want to do is to use the PDF files output intent if the 
> >> printer supports it (the response to a get-printer-attributes IPP 
> >> request to the printer tells which color spaces are supported), 
> >> meaning if it is AdobeRGB only print in AdobeRGB if the printer 
> >> supports it, otherwise fall back to sRGB.
> > 
> > It sounds wrong to set an output intent simply based on support by 
> > the targeted printer.
> > 
> > As I understand it, output intent means "whatever the currently 
> > targeted device is capable of, this (potentially different) color 
> > space is the truly intended one".  I.e. setting output intent is not 
> > normally wanted at all.
> > 
> > With the above in mind, try read this again:
> > 
> >>> If you use both -sOutputICCProfile="ICC_profile.icm" and 
> >>> -dUsePDFX3Profile and there is an output intent included in the 
> >>> PDF file, the output intent is an intermediate mapping (i.e. 
> >>> proofing profile) that will be used.
> >>>
> >>> Unless you really want that, it would be my recommendation that 
> >>> you just use
> >>>
> >>> -sOutputICCProfile="ICC_profile.icm" and not -dUsePDFX3Profile
> > 
> > ...and notice the "you really want that" part.  You _really_ want 
> > CUPS to do proofing by default for devices that supports it?

> What I want to have is the following:
> I want that if a user prints an arbitrary (PDF) file that he gets the 
> best color gammut which the printer supports. This should work fully 
> automatically, as most users do not know about color management.

Have CUPS consult DBus interface of colord and if that provides a 
printer ICC profile (or an ICC profile is hardcoded in the PPD file), 
then pass -sOutputICCProfile="..." to ghostscript.

You could optionally have CUPS inspect if the PDF file has defined an 
output intent and if certain that it provides one, then (as I understand 
it) additionally pass -dUsePDFX3Profile to ghostscript.

> Now what is the best strategy now to make best use of the color spaces 
> the printer support, to once not cut down the color gammut of the 
> input file when sRGB gets used on a printer which could do AdobeRGB 
> and also not loose color depth if a n input file with a color gammut 
> fitting into sRGB is printed in AdobeRGB.

There is no single answer - it depends on which "best" you want.

That's why you need to consult the system and the print job.

 - Jonas

 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: signature
URL: <http://ghostscript.com/pipermail/gs-devel/attachments/20210519/9e3f685e/attachment.sig>

More information about the gs-devel mailing list