Install DCPS. For hobbyists the license is included: DCPS-OPEN
Configure DCPS by copying the template: SYS$STARTUP:DCPS$STARTUP.TEMPLATE to SYS$STARTUP:DCPS$STARTUP.COM
I made the following alterations:
Define the DCPS_LIB logical to point to the standard control library located in SYS$LIBRARY:DCPS$DEVCTL.TLB, and a user defined library (to be created in a minute) called SYS$LIBRARY:DCPS$SITE.TLB. The directory and file extensions are not specified in the logical, but we must specify that our custom library contains ANSI control sequences:
$ DEFINE /SYSTEM /EXECUTIVE DCPS_LIB DCPS$DEVCTL, "DCPS$SITE /DATA=ANSI"
If in Europe define the default paper size as A4:
$ DEFINE /SYSTEM /EXECUTIVE DCPS$SHEET_SIZE A4
Then define the printer execution queue:
$ IF .NOT. SETUP_MODE THEN @SYS$STARTUP:DCPS$EXECUTION_QUEUE -
SYS$PRINT - ! P1 - Execution queue name
"IP_LPD/192.168.1.198:lp1" -! P2 - Interconnect protocol/device name
DCPS_LIB - ! P3 - Logical name for library(ies)
"SIDES=2" - ! P4 - Default queue parameters
"/SEPARATE=(NOBURST,FLAG)" - ! P5 - Default queue qualifiers
"" - ! P6 - Communication speed (serial only)
"" - ! P7 - Device characteristics
"" ! P8 - Verify on/off
Significant parts of this file are the parameters:
P1 - if you specify this as SYS$PRINT you'll not need to specify a queue name when printing
P2 - protocol of IP_LPD specifies we are printing to an LPD printer - followed by the IP address and the name of the print queue (the default remote queue name is normally lp)
P3 - this is the logical name defining the form library(s) the queue users (the one we defined earlier in this file)
P4 - SIDES-2 my FS1020D is a duplex printer - this specifies duplex printing
You need to define a setup module and add it to a text library. The setup module is a string of ANSI control sequences that are interpreted by the DCPS print engine. The setup module can either be defined directly in the PRINT command using the /SETUP parameter or via a FORM definition.
The following text file sets up the printer for 132 character portrait printing:
$ type sys$library:wide132.txt
where ESC is the escape code Ctrl-[. You can create escape
Breakdown of the ANSI control string:
To create the custom control library (initially empty):
$ library/create/text sys$library:dcps$site.tlb
To replace the module in the custom control library (note that the library extension .TLB and text file containing the ANSI control sequence .TXT are not specified):
$ set def sys$library
$ library/replace/text dcps$site wide132
(If previously created) delete the form to use:
$ delete/form wide132
Create a form using the /setup parameter to define the module to use. The /stock-default is required unless you are using a specific stock:
$ define/form/width=132/setup=wide132/stock=default wide132 2
You should now be able to print using the following:
$ print/form=wide132 myfile.lst
The DCPS$STARTUP.COM and form definition commands needs to be added to the SYS$STARTUP:SYSTARTUP_VMS.COM file to get run automatically at startup.
Note: the only reference I could find to setting the horizontal pitch in relation to DCPS used the command ESC
This is an excerpt from the the Digital ANSI-Compliant Printing Protocol Level 2 Programming Reference describing the horizontal pitch command:
DECSHORP—Set Horizontal Pitch
Selects character spacing for monospaced fonts.
Source: Application Destination: Levels 1, 2, 3
Format
CSI Ps w
9/11 *** 7/7
Description
The DECSHORP command determines the number of characters/inch (pitch)
that the device uses. This establishes the Horizontal Advance Increment
(HAI).
The selective parameters for DECSHORP are as follows:
Ps HAI Pitch
0 720 centipoints 10 characters/inch
1 720 centipoints 10 characters/inch
2 600 centipoints 12 characters/inch
3 545 centipoints 13.2 characters/inch
4 436 centipoints 16.5 characters/inch
5 1440 centipoints 5 characters/inch
6 1200 centipoints 6 characters/inch
7 1090 centipoints 6.6 characters/inch
8 872 centipoints 8.25 characters/inch
9 480 centipoints 15 characters/inch
11 420 centipoints Approximately 17.1 characters/inch or, more
accurately, 14/240 in.
12 840 centipoints Approximately 8.55 characters/inch or, more
accurately, 28/240 in.
13 400 centipoints 18 characters/inch
14 800 centipoints 9 characters/inch
15 720 centipoints 10 characters/inch
Links:
my DCPS$STARTUP.COM file
my WIDE132.TXT file
0 comments:
Post a Comment