🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #3956

Re: How to tell if color PS printer?

#3956
From: Rich Berlin
Date: Tue, 06 Oct 1992 16:12
51 lines
2099 bytes
In article <dsmith.717909971@aa.cad.slb.com> dsmith@aa.cad.slb.com (J. Daniel Smith) writes:
>How can I tell with absolute certainty if a printer can print in
>color?  With Level 1 PostScript a solution that probably almost always
>worked was to check for something like "setcmykcolor" since that
>operator was only available on color printers.  However, using Level 2
>PostScript, "setcmykcolor" is supported in all implemtations; its up
>to the rendering mechanism to determine how best to render the color.


Carl Orthlieb <orthlieb@adobe.com> posted the following awhile back.

-- Rich


-------- begin included message --------

The following code determines the number of device colors that a device has:
	0 - Unknown
	1 - Black and White
	3 - RGB or CMY
	4 - CMYK 

Hope this helps, Carl 8^)

%!
% Determine the number of device colors
/NDColors 1 def	% This will be the value if colorimage does not exist
/colorimage where {
	pop
	/NDColors 0		% Unknown
	statusdict begin 
		/processcolors where { 
			pop pop processcolors 
		}{
			/deviceinfo where { 
				pop deviceinfo /Colors known { 
					pop deviceinfo /Colors get 
				} if
			} if
		} ifelse
	end		% statusdict
	def
} if
(Number of Device Colors: ) print NDColors =

-------- end included message --------
--
===============================================================================
Richard.Berlin@Eng.Sun.COM   |   The significant problems we face cannot be
			     |   solved at the same level of thinking we were
			     |   at when we created them.  -- Albert Einstein
Technical Details
Message-ID: <ld3eoaINN38c@exodus.Eng.Sun.COM>
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!ames!sun-barr!news2me.ebay.sun.com!exodus.Eng.Sun.COM!birdland.Eng.Sun.COM!rberlin
References: <dsmith.717909971@aa.cad.slb.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!ames!sun-barr!news2me.ebay.sun.com!exodus.Eng.Sun.COM!birdland.Eng.Sun.COM!rberlin
From: rberlin@birdland.Eng.Sun.COM (Rich Berlin)
Newsgroups: comp.lang.postscript
Subject: Re: How to tell if color PS printer?
Date: 6 Oct 1992 16:12:58 GMT
Organization: SunPics -- A Sun Microsystems Business
Lines: 51
Message-ID: <ld3eoaINN38c@exodus.Eng.Sun.COM>
References: <dsmith.717909971@aa.cad.slb.com>
NNTP-Posting-Host: birdland
Keywords: color