Printer Control Libraries


Text and/or escape sequences can be inserted into the print job at three different points:

  • Setup at the beginning of each file (a PRINT command can specify multiple files to be printed)

  • Page setup at the beginning of each page to control font, page orientation, and so on

  • Reset at the end of the job

Printer control libraries are necessary for most printers (i.e., special control sequences or PostScript must accompany most print jobs to control the printer). OpenVMS contains a default DCPS library of modules called SYS$LIBRARY:DCPS$DEVCTL.TLB, which contains printer control sequences for supported printers. Text libraries are maintained with the LIBRARY utility. The names of the modules in this library are partially displayed as follows:

      $ libr/list dcps$devctl.tlb      Directory of TEXT library SYS$COMMON:[SYSLIB]DCPS$DEVCTL.TLB;6      on  3-SEP-2002 18:43:54      Creation date:  9-MAY-1996 05:48:30       Creator:  VAX-11 Librarian V04-00      Revision date:   9-MAY-1996 05:59:10     Library format:   3.0      Number of modules:    157                Max. key length:  39      Other entries:          0                Preallocated index blocks:     11      Recoverable deleted blocks:      0       Total index blocks used:       21      Max. Number history records:      20     Library history records:       20      DCW1000_DISPLAY      DCW1000_ENHANCED      DCW1000_HIGHRES      DCW1000_NOCORECT      DCW1000_SIMPRESS      DCW1000_STANDARD      DCW1000_VIVDBLUE      DI_BRIGHTER 

To examine the contents of a single module within this library, first it must be extracted with the following command:

      $ library/extract=dcw1000_display/out=temp.txt dcps$devctl.tlb 

Then it is displayed on the terminal with the following command. Only a portion of this PostScript file is shown:

      $ TYPE/PAGE TEMP.TXT      %!      %These files by Tektronix are provided for Digital Equipment Corporation      %      % Copyright (c) 1992,1993 Tektronix, Incorporated.  All rights reserved.      %      % $Revision: 1.1 $      %  Use this file to select the Simulate Display color correction.      %      %  Wrap function with startjob to make the change persistent.      %systemdict/languagelevel known{languagelevel 2 eq{true (0) startjob dup not      % (/exitserver errordict/invalidaccess get exec}if}{false}ifelse}{false}ifelse      %not {quit} if      mark      { currentpagedevice /DeviceRenderingInfo get dup        /Type get 2 ne        { pop 4 dict begin /Type 2 def currentdict end } if        begin 

Thus, for the manager to create new modules, either this library must be modified or a new one must be created. First, the required .TXT file is created with any editor. Then, using LIBRARY/INSERT, that file is added to the library. If the default library is not used, the user library is specified in the /LIBRARY= qualifier and is added to the INITIALIZE command illustrated previously or in the DCPS command file parameter 3.

To see how a manager would perform this task, consider this example. Suppose the printer supported landscape mode. For instance, to put the LN03 printer into landscape requires an escape sequence, "<esc>?21 J", before the data. The manager must perform the following steps:

  • Create a new library to hold this file (or add it to an existing library).

  • Create a .TXT file containing the escape sequence.

  • Initialize the queue to point to this library.

  • Instruct the users how to exercise the landscape option.

First, the ASCII text file (in the example LANDSCAPE.TXT) is created with any of several editors available on OpenVMS. Next, it is inserted into the library. If the library is new, it must be created first, as follows:

      $ LIBRARY/CREATE/TEXT LN03LIBRARY.TLB 

Once created, the file is inserted like this:

      $ LIBRARY/INSERT LN03LIBRARY.TLB LANDSCAPE.TXT 

Thus, the library generally contains several files, each pertaining to a different control sequence recognized by the printer. When the printer queue for the LN03 is created, the library must be specified in the /LIBRARY qualifier like this:

      $ INITIALIZE/QUEUE/LIBRARY=LN03LIBRARY  

When issuing the PRINT command and including the landscape escape sequence, the following command would be issued:

      $ PRINT/SETUP=LANDSCAPE filename 

This PRINT command causes LANDSCAPE.TXT to be extracted from the library specified by the /LIBRARY qualifier and sends it to the printer before sending the specified file. If the print stock is landscape-oriented, it might be more convenient to include the /LIBRARY specification when declaring the form. Forms were discussed previously.




Getting Started with OpenVMS System Management
Getting Started with OpenVMS System Management (HP Technologies)
ISBN: 1555582818
EAN: 2147483647
Year: 2004
Pages: 130
Authors: David Miller

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net