Skip to main content
Participant
May 6, 2009
Question

Color pages information from postscript file

  • May 6, 2009
  • 1 reply
  • 1419 views

I have a postscript file made from a printer driver.

Is there any way we can distinguish between color and b/w pages, i.e to get count of number of colored and B/W pages in the postscript file.


I found on inet that postscript operators setrgbcolor and setcmykcolor give color information

but i wasn't able to find operators setrgbcolor and setcmykcolor in my postscript file.

This topic has been closed for replies.

1 reply

Dov Isaacs
Legend
May 7, 2009

Most actual PostScript operators are actually hidden in PostScript files via use of procedures defined at the beginning of the PostScript file. For better or worse, most PostScript drivers and applications that natively generate PostScript work this way. Thus, unless you actually interpret the entire file, you cannot readily determine any color operations are invoked. Plus, a "black and white page" can be represented as grayscale, CMYK where (0,0,0,K), and separation black. Depending upon the particular PostScript implementation, R=G=B is often interpreted as grayscale as well.

          - Dov

- Dov Isaacs, former Adobe Principal Scientist (April 30, 1990 - May 30, 2021)