<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2002-2-1 (1.71) original version by: Nikos Drakos, CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>H.1 PostScript driver bugs</TITLE> <META NAME="description" CONTENT="H.1 PostScript driver bugs"> <META NAME="keywords" CONTENT="GMT_Docs"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="GMT_Docs.css"> <LINK REL="next" HREF="node207.html"> <LINK REL="previous" HREF="node205.html"> <LINK REL="up" HREF="node205.html"> <LINK REL="next" HREF="node207.html"> </HEAD> <BODY bgcolor="#ffffff"> <!--Navigation Panel--> <A NAME="tex2html5655" HREF="node207.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> <A NAME="tex2html5649" HREF="node205.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> <A NAME="tex2html5643" HREF="node205.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> <A NAME="tex2html5651" HREF="node1.html"> <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> <A NAME="tex2html5653" HREF="node258.html"> <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> <BR> <B> Next:</B> <A NAME="tex2html5656" HREF="node207.html">H.2 Resolution and dots</A> <B> Up:</B> <A NAME="tex2html5650" HREF="node205.html">H. Problems with display</A> <B> Previous:</B> <A NAME="tex2html5644" HREF="node205.html">H. Problems with display</A> <B> <A NAME="tex2html5652" HREF="node1.html">Contents</A></B> <B> <A NAME="tex2html5654" HREF="node258.html">Index</A></B> <BR> <BR> <!--End of Navigation Panel--> <H1><A NAME="SECTION002510000000000000000"> H.1 <I>PostScript</I> driver bugs</A> </H1> <A NAME="31654"></A> <P> When you try to display a <I>PostScript</I> file on a device, such as a printer or your screen, then a program called a <I>PostScript</I> device driver has to compute which device pixels should receive which colors (black or white in the case of a simple laser printer) in order to display the file. At this stage, certain device-dependent things may happen. These are not limitations of <A NAME="tex2html1832" HREF="http://gmt.soest.hawaii.edu"><B>GMT</B></A> or <I>PostScript</I>, but of the particular display device. The following bugs are known to us based on our experiences: <P> <A NAME="31656"></A> <OL> <LI>Early versions of the Sun SPARCprinter software caused linewidth-dependent path displacement. We reported this bug and it has been fixed in newer versions of the software. Try using <A NAME="tex2html1833" HREF="../man/psxy.html"><I><B>psxy</B></I></A><A NAME="31766"></A> to draw <IMG WIDTH="59" HEIGHT="31" ALIGN="MIDDLE" BORDER="0" SRC="img30.png" ALT="$y = f(x)$"> twice, once with a thin pen (<B>-W</B>1) and once with a fat pen (<B>-W</B>10); if they do not plot on top of each other, you have this kind of bug and need new software. The problem may also show up when you plot a mixture of solid and dashed (or dotted) lines of various pen thickness <P> <A NAME="31660"></A> <P> </LI> <LI>The first version of the HP Laserjet 4M (prior to Aug-93) had bugs in the driver program. The old one was <I>PostScript</I> SIMM, part number C2080-60001; the new one is called <I>PostScript</I> SIMM, part number C2080-60002. You need to get this one plugged into your printer if you have an HP LaserJet 4M. <P> <A NAME="31661"></A> <P> </LI> <LI>Apple Laserwriters with the older versions of Apple's <I>PostScript</I> driver will give the error ``limitcheck'' and fail to plot when they encounter a path exceeding about 1000-1500 points. Try to get a newer driver from Apple, but if you can't do that, set the parameter MAX_L1_PATH to 1000-1500 or even smaller in the file <U>src/pslib_inc.h</U> and recompile <A NAME="tex2html1834" HREF="http://gmt.soest.hawaii.edu"><B>GMT</B></A>. The number of points in a <I>PostScript</I> path can be arbitrarily large, in principle; <A NAME="tex2html1835" HREF="http://gmt.soest.hawaii.edu"><B>GMT</B></A> will only create paths longer than MAX_L1_PATH if the path represents a filled polygon or clipping path. Line-drawings (no fill) will be split so that no segment exceeds MAX_L1_PATH. This means <A NAME="tex2html1836" HREF="../man/psxy.html"><I><B>psxy</B></I></A><A NAME="31786"></A> <B>-G</B> will issue a warning when you plot a polygon with more than MAX_L1_PATH points in it. It is then your responsibility to split the large polygon into several smaller segments. If <A NAME="tex2html1837" HREF="../man/pscoast.html"><I><B>pscoast</B></I></A><A NAME="31792"></A> gives such warnings and the file fails to plot you may have to select one of the lower resolution databases The path limitation exemplified by these Apple printers is what makes the higher-resolution coastlines for <A NAME="tex2html1838" HREF="../man/pscoast.html"><I><B>pscoast</B></I></A><A NAME="31797"></A> non-trivial: such coastlines have to be organized so that fill operations do not generate excessively large paths. Some HP <I>PostScript</I> cartridges for the Laserjet III also have trouble with paths exceeding 1500 points; they may successfully print the file, but it can take all night! <A NAME="31667"></A> <P> <A NAME="31668"></A> <P> </LI> <LI>8-bit color screen displays (and programs which use only 8-bits, even on 24-bit monitors, such as Sun's <I>pageview</I><A NAME="31804"></A> under OpenWindows) may not dither cleverly, and so the color they show you may not resemble the color your <I>PostScript</I> file is asking for. Therefore, if you choose colors you like on the screen, you may be surprised to find that your plot looks different on the hardcopy printer or film writer. The only thing you can do is be aware of this, and make some test cases on your hardcopy devices and compare them with the screen, until you get used to this effect. (Each hardcopy device is also a little different, and so you will eventually find that you want to tune your color choices for each device.) The rgb color cube in example 11 may help. <P> </LI> <LI>Some versions of Sun's OpenWindows program <I>pageview</I><A NAME="31808"></A> have only a limited number of colors available; the number can be increased somewhat by starting <I>openwin</I><A NAME="31811"></A> with the option ``<TT>openwin -cubesize large</TT>''. <P> </LI> <LI>Finally, <I>pageview</I><A NAME="31814"></A> seem to have problems understanding the <TT>setpagedevice</TT> operator. We recommend you only use <I>pageview</I><A NAME="31817"></A> on EPS files or use <I>ghostview</I><A NAME="31820"></A> instead. <P> <A NAME="31677"></A> <P> </LI> <LI>Many color hardcopy devices use CMYK color systems. <A NAME="tex2html1839" HREF="http://gmt.soest.hawaii.edu"><B>GMT</B></A> <I>PostScript</I> uses RGB (even if your cpt files are using HSV). The three coordinates of RGB space can be mapped into three coordinates in CMY space, and in theory K (black) is superfluous. But it is hard to get CMY inks to mix into a good black or gray, so these printers supply a black ink as well, hence CMYK. The <I>PostScript</I> driver for a CMYK printer should be smart enough to compute what portion of CMY can be drawn in K, and use K for this and remove it from CMY; however, some of them aren't. <P> </LI> <LI>In early releases of <A NAME="tex2html1840" HREF="http://gmt.soest.hawaii.edu"><B>GMT</B></A> we always used the <I>PostScript</I> command <TT>r g b setrgbcolor</TT> to specify colors, even if the color happened to be a shade of gray (<IMG WIDTH="65" HEIGHT="29" ALIGN="MIDDLE" BORDER="0" SRC="img250.png" ALT="$r=g=b$">) or black (<IMG WIDTH="93" HEIGHT="29" ALIGN="MIDDLE" BORDER="0" SRC="img251.png" ALT="$r=g=b=0$">). One of our users found that black came out muddy brown when he used <I>FreedomOfPress</I><A NAME="31833"></A> to make a Versatec plot of a <A NAME="tex2html1841" HREF="http://gmt.soest.hawaii.edu"><B>GMT</B></A> map. He found that if he used the <I>PostScript</I> command <TT>g setgray</TT> (where <IMG WIDTH="12" HEIGHT="29" ALIGN="MIDDLE" BORDER="0" SRC="img122.png" ALT="$g$"> is a graylevel) then the problem went away. Apparently, his installation of <I>FreedomOfPress</I><A NAME="31840"></A> uses only CMY with the command <TT>setrgbcolor</TT>, and so <TT>0 0 0 setrgbcolor</TT> tries to make black out of CMY instead of K. To fix this, in release 2.1 of <A NAME="tex2html1842" HREF="http://gmt.soest.hawaii.edu"><B>GMT</B></A> we changed some routines in <U>pslib.c</U> to check if (<IMG WIDTH="38" HEIGHT="29" ALIGN="MIDDLE" BORDER="0" SRC="img252.png" ALT="$r=g$"> and <IMG WIDTH="38" HEIGHT="29" ALIGN="MIDDLE" BORDER="0" SRC="img253.png" ALT="$r=b$">), in which case <TT>g setgray</TT> is used instead of <TT>r g b setrgbcolor</TT>. <P> </LI> <LI>Recent experience with some Tektronix Phaser printers and with commercial printing shops has shown that this substitution creates problems precisely opposite of the problems our Versatec user has. The Tektronix and commercial (we think it was a Scitex) machines do not use K when you say <TT>0 setgray</TT> but they do when you say <TT>0 0 0 setrgbcolor</TT>. We believe that these problems are likely to disappear as the various software developers make their codes more robust. Note that this is not a fault with <A NAME="tex2html1843" HREF="http://gmt.soest.hawaii.edu"><B>GMT</B></A>: <IMG WIDTH="93" HEIGHT="29" ALIGN="MIDDLE" BORDER="0" SRC="img251.png" ALT="$r=g=b=0$"> means black and should plot that way. Thus, the <A NAME="tex2html1844" HREF="http://gmt.soest.hawaii.edu"><B>GMT</B></A> source code as shipped to you checks whether <IMG WIDTH="38" HEIGHT="29" ALIGN="MIDDLE" BORDER="0" SRC="img252.png" ALT="$r=g$"> and <IMG WIDTH="38" HEIGHT="29" ALIGN="MIDDLE" BORDER="0" SRC="img253.png" ALT="$r=b$">, in which case it uses <TT>setgray</TT>, else <TT>setrgbcolor</TT>. If your gray tones are not being drawn with K, you have two work-around options: (1) edit the source for <U>pslib.c</U> or (2) edit your <I>PostScript</I> file and try using <TT>setrgbcolor</TT> in all cases. The simplest way to do so is to redefine the <TT>setgray</TT> operator to use <TT>setrgbcolor</TT>. Insert the line <BR> <P> <TT>/setgray {dup dup setrgbcolor} def</TT> <BR> <P> immediately following the first line in the file (starts with %!PS.) <P> </LI> <LI>Some color film writers are very sensitive to the brand of film. If black doesn't look black on your color slides, try a different film. <A NAME="31696"></A> <P> </LI> </OL> <P> <HR> <!--Navigation Panel--> <A NAME="tex2html5655" HREF="node207.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> <A NAME="tex2html5649" HREF="node205.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> <A NAME="tex2html5643" HREF="node205.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> <A NAME="tex2html5651" HREF="node1.html"> <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> <A NAME="tex2html5653" HREF="node258.html"> <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> <BR> <B> Next:</B> <A NAME="tex2html5656" HREF="node207.html">H.2 Resolution and dots</A> <B> Up:</B> <A NAME="tex2html5650" HREF="node205.html">H. Problems with display</A> <B> Previous:</B> <A NAME="tex2html5644" HREF="node205.html">H. Problems with display</A> <B> <A NAME="tex2html5652" HREF="node1.html">Contents</A></B> <B> <A NAME="tex2html5654" HREF="node258.html">Index</A></B> <!--End of Navigation Panel--> <ADDRESS> Paul Wessel 2011-02-27 </ADDRESS> </BODY> </HTML>