Mobile app version of vmapp.org
Login or Join
Cody3331749

: Printer colors differ between ps/pdf draw commands and images TL;DR: Multiple printers give different results when specifying RGB colors in draw commands or in images (/Subtype /Image streams for

@Cody3331749

Posted in: #Pdf #Postscript #PrintDesign

TL;DR: Multiple printers give different results when specifying RGB colors in draw commands or in images (/Subtype /Image streams for PDF, colorimage command in PostScript), even with specified ICC profiles (Between the two ways of defining colors, differences between the two printers are of course expected without proper color management). What's going on?

More Details: Coming from a more general problem I prepared some minimal (not) working examples. They contain commands to draw a row of squares with different colors (a Mathematica color scheme), in PDF

0.148 0.33 0.54 rg 0 0 50 50 re f 0.291389 0.406111 0.647778 rg 50 0 50 50 re f 0.465278 0.467222 0.545556 rg 100 0 50 50 re [...]


in PostScript

0.148 0.33 0.54 csquare
0 1 translate
0.291389 0.406111 0.647778 csquare
0 1 translate
0.465278 0.467222 0.545556 csquare
[..., csquare calls setrgbcolor and draws a square]


and an image containing the same information, a /FlateDecode stream in the PDF and a colorimage command in PostScript:

1 10 8 [1 0 0 1 0 1]
{<
26548a4a68a577778ba38771cf9657e9a755f0b96bf7ca81fedc97fff2bf
>}
false 3 colorimage


I am pretty certain the data in the images are identical to the draw commands (e.g. round(0.148*255) = 26 in base 16 and so on, the flate data for PDF was created with a small python script). On screen the squares look identical. If I now print these documents (on an Oki C610dtn and a Ricoh MP C2011sp) the two rows come out slightly different. Now I do understand that I have no hopes of predicting the exact colors the printers turn a /DeviceRGB definition to, I would have expected them to be consistent over a single document however.

I also tried including an ICC profile, because maybe the printers interpret the unspecified RGB profile differently for draw commands and images. Taking one of the profiles from the ICC v4 test pdf (which permutes the color channels, so it is very obvious to see if it gets applied or not), the printers do apply the profile, but still differ slightly between the two rows.

My only guess would be that the printers try to be clever about it and optimize images in some way. Is there some magic don't futz with my images button I might be missing?

Here are the files if you want to take a look:


PostScript
PDF without profile
PDF with profile


(Apparently the Chromium PDF viewer ignores the /DefaultRGB key so only the image has the profile applied, evince and acroread display the file correctly)

Background: I want to prepare some figures parts of which are only viable to be created as raster images and draw vector legends and annotations that have to use the same colors. As these are just abstract plots absolute color reproduction is not so important, but they have to be consistent between different parts of the document.

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Cody3331749

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme