HP OpenVMS Systems

ask the wizard
Content starts here

Printing, and Escape and Control Sequences?

» close window

The Question is:

Can escape and control codes be generated directly from OpenVMS to an HP
 printer? And if so, how?
Thanks, Wiz.

The Answer is :

  Escape and control codes are simply characters, and characters can
  be sent to printers.  The question then becomes one of interpretation
  and printer state, as most printers have constraints on the expected
  file and data stream contents -- what you need to do depends greatly
  on what you want to do, and on which printer is involved.
  If you wish a particular action on a target device (eg: bold, etc)
  rather than a particular character or character sequence, you can
  retrieve various associated character sequences from SMG using (or
  potentially extending) its existing dictionary contents and
  capabilities.  See the SMG$GET_TERM_DATA, and the SMG terminal
  device data file.  Directly embeding sequences within applications
  tends to cause problems when devices change or additional devices
  are added, as specific devices can have specific requirements in
  this area.
  That said, most folks will use an application or particularly a print
  file format (eg: Postscript) which will effectively locate and embed
  the appropriate sequence(s) into the data stream for the particular
  target device -- use of Postscript-format files, for instance, avoids
  having to code device-specific knowledge into the application.  Again,
  most folks will prefer to avoid embedding escape or control sequences
  directly into the file or directly into the printer data stream.
  For details on device control libraries, please see existing printing
  discussions here starting with (1020).
  If you inject characters directly in the data stream, you will have
  to be familiar with the character set and command requirements of
  the printer.  (eg: with the PCL language for many printers, or with
  Postscript for printers or hosts with Postscript printing support.)
  For details on generating Postscript output directly from within an
  application, please see the Postscript "Red Book" or other such
  Related topics: (7715), (102), (436), (2840), (3795), (4641), (5968).
  Also please see the information on escape and control sequences in
  the OpenVMS Frequently Asked Questions (FAQ).

answer written or last revised on ( 18-AUG-2003 )

» close window