Article View: comp.lang.postscript
Article #6307Re: Ghostscript
From: X. F. Wang
Date: Sat, 15 Jun 1991 18:10
Date: Sat, 15 Jun 1991 18:10
95 lines
4666 bytes
4666 bytes
/* ins845b@monu4.cc.monash.edu.au (mr k.l. lentin) wrote */:
* I have downloaded the new copy of ghostscript 2.2 from simtel20 and it
* won't run. It gives some funny error about a bad command -!7
prep.ai.mit.edu :/pub/gnu/ghostscript* is a definite place to down load
ghostscript. If one uses the binary file for msdos, one has to put
main distribution on c:\gs22 and fonts on c:\gs22\fonts.
Generally I am very pleased with ghostscript 2.2. However the following
small postscript file causes hp laserjet 3 without a cartridge to be out of
memory. I have 4 MB memory installed on the laser printer. It will print on
lps40 of DEC connected with mainframe though. Could someone tell me what
problem it is?
%!PS
% This is the common imageable area of vga, laserjet, lps40.
newpath
10 20 moveto % llx: 10 lly: 20
/x 560 def % urx: 570
/y 750 def % ury: 770
x 0 rlineto
0 y rlineto
x neg 0 rlineto
0 y neg rlineto
stroke
% ----------- some macros --------------------------------
/inch {72 mul} def % definition of inch
/cm {28.35 mul} def % definition of inch
/centershow % cnter a string at currentpoint.
{ dup stringwidth % to use: x y moveto ( string ) centershow
exch 2 div neg exch
rmoveto show } def
/labelfontsize 20 def
/labelfont {/Helvetica findfont labelfontsize scalefont setfont} def
/xname ( Time (sec.) ) def
/yname ( Ln [ Pressure (m torr) ] ) def
/title ( Pressure Increase with Time ) def
%-------------------------------------------------------------
15 cm 7 cm translate 90 rotate
newpath
0 0 moveto
/ixmin 0 def /ixmax 40.0 def /nx 5 def % max. min. x and y values
/iymin 3.5 def /iymax 4.5 def /ny 5 def % and number of div in x and y axies
/alpha 1 def % alpha is scale factor, default: 1
/deltax 15 cm alpha div def % default x dim
/deltay 12 cm alpha div def % default y dim
deltax 0 rlineto % these 4 lines draws a box of deltax by deltay
0 deltay rlineto
deltax neg 0 rlineto
0 deltay neg rlineto
stroke
/stepxcm deltax nx div def % cal x tick mark spacing in cm
/stepycm deltay ny div def % cal y tick mark spacing in cm
/tick 0.3 cm alpha div def % define the length of tick mark
0 stepxcm deltax { 0 moveto 0 tick rlineto stroke } for
0 stepxcm deltax { deltay moveto 0 tick neg rlineto stroke } for
0 stepycm deltay { 0 exch moveto tick 0 rlineto stroke } for
0 stepycm deltay { deltax exch moveto tick neg 0 rlineto stroke } for
% above 4 lines draw tick marks
/stepxvalue ixmax ixmin sub nx div def % tick mark spacing in value
/stepyvalue iymax iymin sub ny div def
/tempstr 10 string def % a temperary string for use
labelfont
0 1 nx
{dup stepxcm mul -1 cm moveto % where to moveto
stepxvalue mul ixmin add % x value
tempstr cvs centershow} for % write x value
% this is to write x lable
0 1 ny
{dup stepycm mul labelfontsize 3 div sub -1.25 cm exch moveto
% move the label 1/3 of the fontsize to make it centered at currentpoint
stepyvalue mul iymin add
tempstr cvs centershow} for
% this is to write y lable
deltax 2 div deltay 1.5 cm add moveto % move to
title centershow % write title
deltax 2 div -2.0 cm moveto % move to
xname centershow % write Xname
90 rotate % to write text vertically, one needs rotate
deltay 2 div 2.5 cm moveto % move to
yname centershow % write yname
-90 rotate % get back to normal
/xpoint { ixmin sub deltax mul ixmax ixmin sub div } def
/ypoint { iymin sub deltay mul iymax iymin sub div } def
newpath
0.0 xpoint 3.648147612953137 ypoint 5 0 360 arc stroke
5.0 xpoint 3.746039150751546 ypoint 5 0 360 arc stroke
10.0 xpoint 3.843930688549954 ypoint 5 0 360 arc stroke
15.0 xpoint 3.941822226348362 ypoint 5 0 360 arc stroke
23.0 xpoint 4.098448686825816 ypoint 5 0 360 arc stroke
25.0 xpoint 4.137605301945180 ypoint 5 0 360 arc stroke
30.0 xpoint 4.235496839743588 ypoint 5 0 360 arc stroke
35.0 xpoint 4.333388377541996 ypoint 5 0 360 arc stroke
40.0 xpoint 4.431279915340405 ypoint 5 0 360 arc stroke
copypage
Technical Details
Message-ID:
<80102@eerie.acsu.Buffalo.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!ub!acsu.buffalo.eduReferences:
<1991Jun15.132428.6646@monu0.cc.monash.edu.au>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!ub!acsu.buffalo.edu From: xiaofei@acsu.buffalo.edu (X. F. Wang) Newsgroups: comp.lang.postscript,comp.sys.ibm.pc.misc Subject: Re: Ghostscript Message-ID: <80102@eerie.acsu.Buffalo.EDU> Date: 15 Jun 91 18:10:10 GMT References: <1991Jun15.132428.6646@monu0.cc.monash.edu.au> Sender: news@acsu.Buffalo.EDU Followup-To: comp.lang.postscript Organization: SUNY Buffalo Lines: 95 Nntp-Posting-Host: autarch.acsu.buffalo.edu