Thread View: comp.lang.postscript
2 messages
2 total messages
Started by J. Daniel Smith
Thu, 01 Oct 1992 03:26
How to tell if color PS printer?
Author: J. Daniel Smith
Date: Thu, 01 Oct 1992 03:26
Date: Thu, 01 Oct 1992 03:26
18 lines
1392 bytes
1392 bytes
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. My situation is this: I have a company logo that uses just one color. On a color output device, I want to use the correct color; however on a B/W device, I want to use black and not some shade of gray. Thanks for any info, Dan -- ========================================================================= J. Daniel Smith dsmith@ann-arbor.cad.slb.com Applicon Schlumberger dsmith@aaaca1.sinet.slb.com Ann Arbor, Michigan (USA) ...!uunet!sharkey!applga!dsmith
Re: How to tell if color PS printer?
Author: Rich Berlin
Date: Tue, 06 Oct 1992 16:12
Date: Tue, 06 Oct 1992 16:12
51 lines
2099 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads