8.6 Checking PostScript Printer capabilities

Following is a PostScript command file that can be used to get a PostScript printer to output a number of useful pieces of information that are needed to set up a printer icon under Windows properly. It was printed from Wordpad, in Win95, through the Generic / Text Only printer driver with the following instructions:

  1. Start, Run, type in Wordpad and press Enter.

  2. File, Open testps.txt

  3. File, Page Setup, Printer, select Generic / Text Only, click Properties

  4. Click Device Options, select TTY custom, click OK.

  5. Click OK, then set all four margins to 0; click OK.

  6. Click File, Print, OK.

This could also have been printed with /usr/bin/lpr on a UNIX command prompt. The file prints Test Page and some printer statistics below that, as follows.

    % filename: testps.txt
    % purpose: to verify proper host connection and function of PostScript
    % printers.
    /buf 10 string def
    /CM {
    save statusdict/product get (Postscript) anchorsearch
    exch pop {length 0 eq
    {2}ifelse exch restore
    }bind def
    /isCM {
    CM 1 ge
    }bind def
    /Times-BoldItalic findfont 75 scalefont setfont
    150 500 moveto
    (Test Page) false charpath
    isCM{gsave 0.0 1.0 1.0 0.0 setcmykcolor fill grestore}if
    2 setlinewidth stroke
    /Times-Roman findfont 10 scalefont setfont
    150 400 moveto
    (Your PostScript printer is properly connected and operational.)show
    150 380 moveto
    (The border around the page indicates your printer's printable region.)show
    { vmreclaim } stopped pop
    vmstatus exch sub exch pop
    150 360 moveto
    (Max Available Printer Virtual Memory (KB):)show
    150 340 moveto
    dup 1024 div truncate buf cvs show
    150 320 moveto
    (Calculated memory size used for PostScript printer icon properties:) show
    150 300 moveto
    0.85 mul 1024 div truncate buf cvs show
    150 280 moveto
    (Printer Model: )show
    statusdict begin product show end
    150 260 moveto
    (PostScript Level: )show
    /languagelevel where
    { languagelevel 3 string cvs show pop }
    {(1) show } ifelse
    150 240 moveto
    (PostScript Version: )show
    statusdict begin
    version show (.)show
    revision 40 string cvs show end
    clippath stroke

This, and other documents, can be downloaded from ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/.

For questions about FreeBSD, read the documentation before contacting <questions@FreeBSD.org>.
For questions about this documentation, e-mail <doc@FreeBSD.org>.