[comp.lang.postscript] Laser Doctor

jim@nih-csl.UUCP (jim sullivan) (12/17/88)

I am in the process of writing a postscript program called Laser
Doctor.  This program, once run in a postscript printer, will
print out on one page a detailed discription of the Printer.  This
is still to be completed.  So far it will printout:
			The product name (i.e. Laserwriter)
			The version of postscript running
			The presence of an Apple dictionary (md)
			All fonts in the Font Dictionary
			
This in itself is not very impressive and I'm looking for more
things I can add to the program.  Does anyone have any suggestions
and if so, a way to perform the addition in postscript.  When it is done
and seems to be a worthwhile program, I'll make it available.

				Jim
				jim@nih-csl.dcrt.nih.gov

edwards@bgsuvax.UUCP (Ken Jenkins) (12/20/88)

In article <865@nih-csl.UUCP>, jim@nih-csl.UUCP (jim sullivan) writes:
> I am in the process of writing a postscript program called Laser
> Doctor.  This program, once run in a postscript printer, will
> print out on one page a detailed discription of the Printer.  This
> is still to be completed.  So far it will printout:
> 			The product name (i.e. Laserwriter)
> 			The version of postscript running
> 			The presence of an Apple dictionary (md)
> 			All fonts in the Font Dictionary
> 			
> This in itself is not very impressive and I'm looking for more
> things I can add to the program.  Does anyone have any suggestions
> and if so, a way to perform the addition in postscript.  When it is done
> and seems to be a worthwhile program, I'll make it available.
> 
> 				Jim
> 				jim@nih-csl.dcrt.nih.gov

/paramdict 200 dict def
paramdict begin
statusdict paramdict copy paramdict
/s 10 string def
/sl 100 string def
/H {/Helvetica findfont 9 scalefont setfont} def
/HB {/Helvetica-Bold findfont 9 scalefont setfont} def
/x 20 def /y 756 def /mx x 46 add def /lead {/y y 9 sub def} def
x y moveto
HB
(The PostScript Default Parameters within the Linotronic PostScript RIP) show
lead x y moveto H
/line {(_________________________________________________________________) show
lead lead x y HB moveto} def 
line
(1) print flush
clear
(Password status check) show H lead lead
/password 0 def
x y moveto 
999999{password checkpassword {pop password s cvs show mx y moveto ( is the
current password.) show lead clear exit } {/password password 1 add def}ifelse
}loop
x y moveto 
line
(2) print flush HB 
(Disk drive status check) show H lead lead x y moveto
(Hard Disk Manufacture. ) show 145 y moveto 
/cdc <0101040402b800000000> def /cdc1 <0101040839c00000000> def
/micro <01010402033d00000000> def /micro1 <0101040703ff00000000> def
/fujitsu <0101040302f100000000> def /fujitsu1 <0101040a02f100000000> def
/default <00000000000000000000> def
/str 10 def
(%stdout) (w) file
s diskdriveparams s cdc eq {(CDC model # 9415-521)show} {(clear s
diskdriveparams)}ifelse 
s cdc1 eq {(CDC model # 9415-586) show} {(clear s diskdriveparams)}ifelse s
micro eq {(Micropolis model # 1302) show} {(clear s diskdriveparams )}ifelse s
micro1 eq {(Micropolis model # 1325) show} {(clear s diskdriveparams)}ifelse s
fujitsu eq {(Fujitsu model # M2241AS) show} {(clear s diskdriveparams )}ifelse s
fujitsu1 eq {(Fujitsu model # M2243AS) show} {(clear s diskdriveparams)} ifelse 
s default eq {(Using PostScript default or EErom reset) show} {(clear)} ifelse 
lead lead x y moveto 
diskstatus /disksize exch def /usersize exch def
disksize s cvs show mx y moveto ( Total disk size ) show lead x y moveto clear
usersize s cvs show mx y moveto  ( Users disk size ) show lead x y moveto 
clear
userdiskpercent s cvs show mx y moveto ( User disk percentage) show lead x y
moveto
clear 
line
(3) print flush HB
(Batch and Interactive status check) show H lead lead x y moveto
9 sccbatch /control exch def /baud exch def
baud s cvs show 66 y moveto ( Baudrate. 9 pin, batch mode. ) show lead x y
moveto clear control s cvs show 66 y moveto ( is the flow control. See page 12
in Series 100 Supplement.) show lead lead x y moveto
clear
25 sccbatch /control exch def /baud exch def  
baud s cvs show 66 y moveto ( Baudrate. 25 pin, batch mode.) show lead x y
moveto clear control s cvs show 66 y moveto ( is the flow control. See page 12
in Series 100 Supplement.) show lead lead x y moveto 
clear
9 sccinteractive /control exch def /baud exch def 
baud s cvs show mx y moveto ( Baudrate. 9 pin, interactive mode. ) show lead x y
moveto clear control s cvs show 66 y moveto ( is the flow control. See page 12
in Series 100 Supplement.) show lead lead x y moveto
clear
25 sccinteractive /control exch def /baud exch def 
baud s cvs show 66 y moveto ( Baudrate. 25 pin, interactive mode. ) show lead x
y moveto clear control s cvs show 66 y moveto ( is the flow control. See page 12
in Series 100 Supplement.) show lead x y moveto
clear
line
(4) print flush HB
(Page Size status check) show H lead lead x y moveto
defaultpageparams /orientation exch def /offset exch def /depth exch def /width
exch def   width s cvs show mx y moveto ( width of page parameters in points)
show lead x y moveto
clear
depth s cvs show mx y moveto ( Depth of page parameters in points) show lead x y
moveto clear
offset s cvs show mx y moveto ( Offset of page in points) show lead x y moveto
clear
orientation s cvs show mx y moveto ( Orientation of page. 0 = Landscape 1 =
Portrait) show lead x y moveto clear 
defaultresolution s cvs show mx y moveto  ( The default resolution should be
zero.) show lead x y moveto
clear
resolution s cvs show mx y moveto  ( is the current resolution of the
Linotronic) show lead x y moveto 
clear
line
(4.5) print flush HB
(Default Left Margin, Default Mirror Image, and Default Negative Image) show H
lead lead x y moveto
defaultpagemargin s cvs show mx y moveto ( Left margin in points) show lead x y
moveto
clear
defaultmirrorprint s cvs show mx y moveto ( Mirror Image. False = Right Read,
True = Wrong Read) show lead x y moveto
clear
defaultnegativeprint s cvs show mx y moveto ( Negative Image. False = Black on
White, True = White on Black) show lead x y moveto
clear
line x y moveto
(4.8) print flush HB
(Current Status of Mirror print and Negative Print) show H lead lead x y moveto
mirrorprint s cvs show mx y moveto ( Status of Mirror print) show lead x y
moveto
clear
negativeprint s cvs show mx y moveto ( Status of Negative print) show lead x y
moveto
clear
line x y moveto
(5) print flush HB
(EERom status check) show lead lead H x y moveto
eerom s cvs show mx y moveto ( status. If true, ALL OK) show lead x y moveto
clear
line
(6) print flush HB
(Timeout values status checked) show lead lead H x y moveto
jobtimeout s cvs show mx y moveto ( seconds for job time out ) show lead x y
moveto
clear
waittimeout s cvs show mx y moveto ( seconds for wait timeout) show lead x y
moveto
clear
line
(7) print flush HB
(MISC.) show lead lead H x y moveto
product sl cvs show 135 y moveto  ( Product Type) show lead x y moveto
clear
appletalktype sl cvs show 135 y moveto ( AppleTalk Type, LaserWriter is the
correct type) show lead x y moveto 
clear
sl printername sl cvs show 135 y moveto  ( Printer's name) show lead x y moveto 
clear
line
(8) print flush H
pagecount s cvs show mx y moveto  ( Pagecount) show lead x y moveto
clear
end
systemdict begin
version 80 string cvs show 66 90.4 moveto  ( is the current version of
PostScript) show
showpage
end 

----------------------------------------------------------------------------

This might be what you're looking for.


-------------------------------------------------------------------------------
Disclaimer: My name is Ken Jenkins and I am here as a guest of Bruce Edwards
            to whom this account belongs. Although he may be interested or even
            amused by my ramblings, he should not be held accountable for them 
            in any way.  
-------------------------------------------------------------------------------
   "Politics is ,in the ultimate analysis, religion applied to economics"
-------------------------------------------------------------------------------
Ken Jenkins (as a guest of Bruce Edwards)    CSNET: edwards@bgsu.edu
                                           ARPANET: edwards@andy.bgsu.edu
                                              UUCP: ..!osu-cis!bgsuvax!edwards
-------------------------------------------------------------------------------