TXT2PDF User Guide PDF
TXT2PDF User Guide PDF
Guide
Leland Lucius
pdf@homerow.net
Lionel B. Dyck
lbdyck@gmail.com
However, the software may not be exported to certain countries and their nationals as they are
restricted by Section 734.2 of the EAR (Export Administration Regulations). These countries include,
but are not limited to, Cuba, Iran, Iraq, Libya, North Korea, Syria, and Sudan. Please refer to the
Export Administration Regulations website for more information.
Individuals
We would like to acknowledge the following individuals. Through their suggestions, testing, and code
contributions, TXT2PDF has become a much better product overall.
Leland Lucius: For the TXT2PDF REXX code and the T2PINIT, T2PARC4, T2PMD5, and
T2PTERM assembler code.
Lionel B. Dyck: For creating XMITIP without which the original TXT2PDF code would have
remained hidden in some other homegrown applications and never seen the light of day. (Not to
mention his already established distribution channels. Lionel has also contributed the TXT2PDFI ISPF
dialog and this document, for which you should be extremely thankful. I hate doing documentation
Andy W. Robertson: For fixing and enhancing the original escaping code and translation tables.
A. Harry Williams: For adding the original CMS and Regina support without which TXT2PDF
would still be running on OS/390 only.
Neal E. K. Gooch: For fixing some environment handling issues, adding Object REXX compatibility,
and contributing the initial multi-level indexing code.
Felipe Cvitanich: For contributing the PDFXLIB EXEC making it much easier to create the external
translation table.
Len Steele: For major testing, feature suggestions, and making me think about other things “the right
way.”
Frank M. Ramaekers Jr.: For giving all you VMers compression and encryption by doing a pretty
darn good job of converting and generalizing the assembler routines.
And many more: See the EXEC for a list of all contributors and the list of changes for their
contribution. (Gettin‟ to be too many to list here. ;-))
Routines
Several routines used by TXT2PDF were located on the Internet and we‟d like to thank their authors
for publishing them. Any and all rights to these routines remain with the original authors.
The Cos(), Pi(), Sin(), Sqrt() and QSort() routines were culled from the "Album of Algorithms and
Techniques" by Vladimir Zabrodsky. If you use REXX, you HAVE to check this out:
www.geocities.com/zabrodskyvlada/aat
Lionel B. Dyck
Email: lbdyck@gmail.com
Web: www.ldbsoftware.com
Leland Lucius
Email: pdf@homerow.net
Web: www.homerow.net
Annotations
Outline Generation
Color Control
Several Background Options
Viewer Control
The following features are only available on OS/390, z/OS, and z/VM platforms:
ISPF Dialog
While the original design was simply to convert OS/390 reports to PDF prior to emailing, TXT2PDF
has been generalized and adapted to other platforms including Linux, VM, and Windows. All that is
required is a REXX interpreter or compiler on the target platform.
Not sure about the load modules within the z/VM environment – awaiting word from someone who
knows z/VM.
The command syntax is keyword followed by an option with no intervening equal sign. If the option
contains embedded blanks then the entire option must be enclosed in quotes.
Under TSO, and ISPF, all data set names are processed using the standard TSO and ISPF conventions.
This means that if a TSO PREFIX is different from the Userid then that PREFIX will be used when
accessing data set names that are not fully qualified and enclosed within quotes.
On platforms that have “standard” input and output files, you may omit this parameter and the input
text will be read from “standard” input. This includes the CMS environment when TXT2PDF is run as
a PIPELINE stage.
Syntax: IN file-specification
z/VM: IN report.text.a
Others: IN report.txt
OUT
The OUT keyword defines the file that will be created from the conversion of the input file. The file
specification is any valid file specification for the platform.
On platforms that have “standard” input and output files, you may omit this parameter and the output
PDF file will be written to “standard” output. This includes the CMS environment when TXT2PDF is
run as a PIPELINE stage.
ANNOT
Annotations are similar to yellow post-it notes that are placed within a document.
row the row, or line, on the page where the note will be placed
Default: 1
col the column where the note will be placed. This is only
approximate as TXT2PDF does not have the font metrics for
an exact placement.
Default: 1
Default: 1
BG
The background will be drawn before the text of the document and this allows you to specify as many
backgrounds as you like. They will be placed in the order you specify.
The STREAM background allows you to include valid PDF stream content from an external file, while
the TEXTMARK and TMARK types produce an effect similar to a watermark.
Syntax: BG STREAM/file-specification
BG TEXTMARK/style/text-color/fill-color/opacity/text
BG TMARK/style/text-color/fill-color/opacity/font-size/text
BG TMARK/style/text-color/fill-color/opacity/font-name/font-size/text
STREAM:
fill-color If not specified the text will appear hollow, otherwise the color
used to fill the letters.
Default: Gray
Examples:
BG Stream/‟userid.stream.data set‟
BG Textmark/bottomup//gray/100/TXT2PDF
BG Textmark/td/yellow/black/80/TXT2PDF
BG Tmark/td/yellow/black/80/12/TXT2PDF
BG Tmark/td/yellow/black/80/Vera/12/TXT2PDF
BM
The bottom margin is the offset in inches from the bottom of the page.
Syntax: BM offset
Example: BM 0.8
BROWSE
Defines whether messages generated by TXT2PDF will be displayed. If under ISPF the messages will
be displayed in an ISPF Browse display otherwise the message will appear on the active window.
Yes Y
No N
Default: No
Example: BROWSE No
CC
Specifies if the input data set contains carriage control characters in column 1 of the data. Both ASA
and Machine carriage control characters are supported.
Syntax: CC option
Example: CC Yes
Where foreground defines the color of the text on the page and background is the
color of the page.
All colors can be specified using either the following names or by specifying the
exact RGB values by using 6 hexadecimal digits formatted as RRGGBB.
Though intended for use with the barred paper style, the following colors may also
be used:
COMPRESS
Defines a level of compression from level 0 (none) to level 9 (maximum).
Default: 0
Example: COMPRESS 2
CONFIG
The CONFIG keyword defines a file containing additional parameters. Everything in this file will be
processed as if it had been included as arguments to the TXT2PDF command. Any arguments on the
TXT2PDF command will override parameters in the Config file. Nested Config files are also
supported. Comments are statements with an * in column 1. Continuation is by either a blank dash “ –“
combination or a plus “+” at the end of a record.
Default: none
CONFIRM
Defines the level of messages displayed during the TXT2PDF conversion process.
Default: Yes
DEFCFG
Defines the name of the default config file as used by the CONFIG parameter. This does not actually
cause inclusion. The specified file will be included only if there are no command line parameters.
Default: none
DELIM
The DELIM parameter allows you to change the character used to delimiter between arguments. Any
parameter following this one must use the new specification.
Default: /
Examples: DELIM ,
DINFO
Document Information, or DINFO, references a file which contains a name followed by a description
that will be added to the Document Information dictionary within the PDF file.
Default: none
DRAW
The DRAW parameter allows you to draw different objects on the page. At this time, you may draw
lines, unfilled rectangles, filled rectangles, static text, and dynamic strings.
To provide the most flexibility, coordinates and sizes are specified in PDF user space units. Each unit
is 1/72 of an inch and the origin is the bottom left of the page. In addition, margins are ignored.
Default: Butt
Default: Miter
The “dotoff” value specifies the number of units the gaps will
have between dashes. If you do not specify a “dotoff” value,
it will default to the “doton” value and the result will be same
sized dashes and gaps.
Default: Miter
% - literal percent
a - abbreviated weekday name
A - full weekday name
b - abbreviated month name
B - full month name
@ - literal at sign
p - PDF page number (1 based)*
Default: none
The UCM files can be obtained from the ICU Project source code repository. Select the desired
mapping and save it as a plain text file. If needed, upload it to either a PDS or sequential file as ASCII
to allow conversion to EBCDIC.
DEFINE:
file-specification Specifies the file name or dataset name that contains the UCM
format encoding.
Examples:
ENCODING DEFINE/ibm1047/‟userid.stream.data set‟
ENCODING DEFINE/1255/ibm-1255_P100-1995.ucm
ENCRYPT
Encryption enables the securing of the created PDF file. At present only the PDF Standard security is
supported. Note: This option is only supported on OS/390, z/OS, and CMS at this time.
ST:
key-length Specifies the length of the encryption key. Valid values are:
Default: 40
parms Controls what the user can do with the document. Specify any
of the following, separated by a “/”:
FONT
Defines the font to be used.
name Name of the font defined via the XFONT parameter or one of
the following predefined PDF Type 1 font names:
Times T
TimesBold TB
TimesItalic TI
TimesBoldItalic TBI
Helvetica H
HelveticaBold HB
HelveticaItalic HI
HelveticaBoldItalic HBI
Courier C
CourierBold CB
CourierItalic CI
CourierBoldItalic CBI
Symbol S
ZapfDingbats Z
Default: Courier
Under TSO, the default value will be the prefix from the current profile. If one is not assigned, the
current userid will be used. If the current prefix and userid are both assigned AND they aren't the
same, both will be used, separated by a period.
Under IRXJCL, the default value will be the current userid, if available.
IFEMPTY
Alters the behavior when an empty input file is detected.
Default: ERROR.
You use the LOAD function to load the image from a file and assign it a name. Then you use the
DRAW or TILE functions to draw the image on the page using the name you assigned.
An advantage of separating the LOAD and DRAW/TILE functions is that you may LOAD several
images in the default configuration file (TXT2PDFD) and they will always be available. Just DRAW
it by name when you need it.
To provide the most flexibility, coordinates are specified in PDF user space units. Each unit is 1/72 of
an inch and the origin is the bottom left of the page. In addition, margins are ignored.
LOAD:
DRAW:
skewy The amount of vertical skew (or slant) specified in degrees the
image will have.
Default: 0
start Specifies the first page number on which the image will be
drawn.
Default: 1
Syntax: LM offset
Examples: LM 0.5
LM 2
LM -.5
LPI
Defines the number of Lines-Per-Inch for the text to be placed on the page.
Syntax: LPI n
Default: 8
Examples: LPI 8
LPI 6
Note: LPI is not affected by the Inch vs. Centimeter installation configuration option. It is
always in lines per inch.
MAG
Allows you to specify the initial magnification level upon opening the document.
Default: none
MAXOSIZE
Allows you to place limits on the size of the PDF file produced and, if exceeded, will an error message
will be produced.
Default: 0 (disabled)
Default: Yes
Examples: MSGID Y
MSGID No
MSGLVL
Provides a way to override the default level of any message produced by TXT2PDF.
OLOPT
Allows setting of options that relate to all outlining types.
Specify any of the following options, separated with the "/" character:
Default: none
A - Ascending sequence
D - Descending sequence
Default: unsorted
Examples: OLSORT A
OLSORT d
OLTOK
Specifying an outline token allows you to generate a multi-level outline. The token is one or more
characters that will be used to split the outline text into multiple segments. Each segment will become
a new outline level.
For instance, if the OUTLINE keyword selected “2003/10/27” as an outline and you specified a token
of “/”, then you would get a 3 level outline. The first level would be 2003, the second would be 10,
and the third would be 27.
Examples: OLTOK /
OLTOK “it can be a phrase”
OLTOK “ “
ORIENT
Orientation of the image on the paper.
Landscape Land L
Portrait Port P
Default: Portrait
Examples: ORIENT P
ORIENT Landscape
ORIENT Land
ROWCOL:
row The row where the text is located or 0 to select all non-blank
rows on the page.
Default: none
SCANROW:
row The row that will be scanned for a match to the "text"
argument.
Default: none
data col The column where the data starts. This may be a specified as
an absolute column within the selected row or it may be
relative to the start of the located text. You specify a relative
location by prefixing the "data col" argument with a plus (+)
or minus (-) sign.
Default: none
SCANCOL:
col The column that will be scanned for a match to the "text"
argument.
Default: none
data col The column where the data starts. While this may be a
relative column location as described under ScanRow, it
doesn't make much sense because the scan column is known
ahead of time. This should really be a "data row" argument,
but the scanning routine does not have access to all rows at
once.
SCAN:
data col The column where the data starts. This may be a specified as
an absolute column within the selected row or it may be
relative to the start of the located text. You specify a relative
location by prefixing the "data col" argument with a plus (+)
or minus (-) sign.
Default: none
text The text for which to search. Every row will be scanned for
this text.
Default: none
OUTREC
Forces truncation of output records to the given length.
Default: 999999
You may specify the exact width and height in inches, e.g.,
8.5" x 11" or one of the following values:
Default: none
Default: none
RM
Defines the offset in inches from the right side of page where the text will end.
Syntax: RM offset
Default: 0.5
Example: RM 0.5
ATTR:
font name The name of the font to apply to the text. See the FONT
parameter for allowable values.
Default: none – uses page level font
foreground color The foreground colorspec. See the COLOR parameter for
allowable values.
Default: none – uses page level text color
scan type The method used to select the text to which the attributes will
be applied.
Default: none
ROWCOL:
row The row where the text is located or 0 to select all
non-blank rows on the page.
Default: none
SCAN:
text The text to scan for. The entire page will be scanned
and, if the text is found, the specified attributes will be
applied
Default: none
Syntax: TM offset
Default: 0.5
Example: TM 0.5
TRANS
Define transition effects when moving from one page to the next when displaying a document in full
screen or slide show modes.
Blinds BL
Box BO
Dissolve D
Glitter G
Replace R
Split S
Wipe W
Default: none
Default: 1
opts/... Allows you to modify the behavior of the effect. The options
are different for each effect, but they aren't described
individually. You will need to experiment.
Default: none
Inches I
Centimeters C
Default: Inches
VIEWER
Allows you to specify how the viewer should behave when displaying the file. Again, these are only
recommendations and the viewer may simply ignore them.
None N
Outlines O
Thumbs T
Default: none
Default: No
XFONT
Allows the use of fonts other than the standard 14 Adobe fonts.
INTERNAL:
name Name to assign to the font.
Default: none
font name Name of one of the following builtin PDF font names:
Times T
TimesBold TB
TimesItalic TI
TimesBoldItalic TBI
Helvetica H
HelveticaBold HB
HelveticaItalic HI
HelveticaBoldItalic HBI
Courier C
CourierBold CB
CourierItalic CI
CourierBoldItalic CBI
Symbol S
ZapfDingbats Z
Default: none
TRUETYPE:
name Name to assign to the font.
Default: none
XLATE
Allows you to specify the name of a translation table EXEC other than the default TXT2PDFX. This
allows you to override the default at runtime.
The <execname> parameter specifies a standard Rexx EXEC that you can model after TXT2PDFX or
one of the XLATEnnn samples.
Default: none
The ISPF dialog is very easy to use and greatly simplifies the coding of the TXT2PDF command, as
the dialog actually reports on the complete syntax of the generated TXT2PDF command. The Batch
Execution Mode option can be used to generate a data set with the TXT2PDF generated command as
well as the necessary JCL. This data set can then be submitted for batch execution or to be copied into
a production job‟s JCL.
1. The TXT2PDF command, when entered with no parameters and under ISPF, will invoke the
ISPF dialog.
2. The TXT2PDFI command will directly invoke the ISPF dialog.
Note: the ISPF Dialog interface does not support the following TXT2PDF options: CONFIG, DINFO,
OUTREC, TRANS, UNITS, or VIEWER..
_ Annot _ Background
_ Color _ Miscellaneous options
_ Encryption _ Outline Options
_ Font Specification _ Page Specification
_ Validation Only
This panel requires the entry of the input and output data set names. The output data set must not
currently exist, if it does an ISPF popup will appear asking the user if they wish to proceed, by entering
Yes, or to re-specify the output data set, by pressing PF3.
The optional selections will bring up additional panels that allow the specification of more detailed
conversion options.
The Validation Only option will cause the generated TXT2PDF command syntax to be validated
without performing any processing.
If the TXT2PDFI exec is executed with the option of CONFIG then the following panel will be
displayed and the Processing prompt panel will be bypassed.
_ Annot _ Background
_ Color _ Miscellaneous options
_ Encryption _ Outline Options
_ Font Specification _ Page Specification
_ Validation Only
This panel will prompt the user to enter the information to create a single yellow sticky note.
Background Panel
The Background panel prompts for the entry of the information used to generate the BG keyword. This
information is used to define a watermark for each page of the generated report.
Color Panel
Foreground color:
Background color:
The Color panel prompts for the color of the characters on the page (foreground) and the color of the
background. Special background colors are available which generate a bar-like paper color.
Owner Password :
User Password :
Encryption Length: 40 or 128 bit encryption
Optional Protections
Note: 128-bit encryption will only work with Adobe Acrobat 5.0 and newer
The Encryption panel prompts for security information for the generated report. Note that the 128-bit
encryption is not supported by Adobe Acrobat 4.0 and older
Font Panel
The Font panel prompts for the size and name of the font to be used for the characters printed on the
report. The zoom option allows you to take an existing font size and scale it up or down.
Miscellaneous Panel
The Miscellaneous panel is a catch all panel for options that didn‟t neatly fit with the other organized
panels.
Outline Panel
Outline Options
Color :
AltColor:
Sort : A:Ascending D:Descending
Token :
The Outline Options panel prompts for additional formatting options for the outline
The Page and Paper panel prompt for information about the layout of the logical page for the report.
The Margin and Paper size displayed will be based on the installation defaults and will be either Inches
or Centimeters.
Once all the options have been selected the following process selection panel will be displayed:
During Edit the Job Statements and the TXT2PDF Command may be
changed.
This allows the user to review the generated TXT2PDF command with the following options:
The following is an example of the generated JCL and control statements. The first four statements are
the JOB statements. These statements may be modified while using the J or the E (Edit) options. The
data set name on the SYSEXEC DD statement is dynamically determined based upon the location of
where the TXT2PDF REXX is currently being executed from.
Target Userid :
Target Password: Confirm Password:
This panel will prompt for information needed to build the JCL and control statements to FTP the
generated report to another platform.
To Address :
From Address :
Subject :
Attach Name :
Short Message:
It is important the you specify your real e-mail address in the from field
in case the to address is incorrect causing the mail to bounce or the
recipient tries to reply to this e-mail.
This panel will prompt for the information necessary to build the JCL and XMITIP command to e-mail
the generated report to an e-mail address.
If a foreground execution is selected the following process selection panel will be displayed:
D - Download to your PC
F - FTP the generated PDF File
M - E-Mail the geneated PDF File (via XMITIP)
Download Panel
File: output-data-set-name
You may now begin the file transfer using your emulator file transfer process
or you may use TCP/IP FTP (File Transfer Protocol) from a workstation
command prompt:
ftp your-host-name
- enter your userid and password when prompted
get output-data-set-name workstation.filename
quit
Note: When the file transfer is complete press Enter or PF3 to leave this
panel. At that point the above data set will be deleted.
This panel is used to prompt the user to download the generated report data set. Both IND$FILE and
TCP/IP FTP are supported.
FTP Panel
Target Userid :
Target Password: Confirm Password:
This panel prompts for the necessary information to execute the TCP/IP FTP command under ISPF to
transfer the generated report to the requested target host.
The Mail panel is the XMITIP ISPF dialog. For further information see the XMITIP Users Guide.
CC Address ===>
BCC Address ===>
AddressFile ===>
Delivery Settings ===> Yes or No (for Import, Prior, Sens)
Example 1: This demonstrates creating a PDF document in Portrait orientation with Letter size paper,
using the BlueBar scheme for the paper background. A watermark is created using the BG Textmark
option. This generates text flowing from the bottom up to the top of the page diagonally in 30 point
font size with the characters TXT2PDF. Margins are specified and carriage control is turned off.
//TEST JOB . . .
//BATCHTMP PROC
//TMP EXEC PGM=IKJEFT1B,DYNAMNBR=200
//STEPLIB DD DISP=SHR,DSN=hlq.load
//SYSEXEC DD DISP=SHR,DSN=rexx.lib
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DDNAME=SYSIN
// PEND
//IVPK EXEC BATCHTMP
//SYSIN DD *
%txt2pdf IN 'install.pds(changes)' +
OUT 'hlq.temp.changes.pdf' +
ORIENT Port +
PAPER Letter/Bluebar +
BG Textmark/Bottomup/Black/Yellow/30/TXT2PDF +
FONT 9 +
LM .5 RM .5 TM .46 BM .5 +
CC No
/*
In this example a generic inline PROC is used for the batch TSO terminal monitor program. The
STEPLIB is required if the TXT2PDF load modules are not in either the LPA or a Linklist library.
Coding the TXT2PDF command to span records requires a continuation character. This character may
be either a plus (+) or a minus (-) at the end of a statement as shown. The continuation is not required
on the last statement.
or
or
Linux and Windows instructions are based on the use of the Regina interpreter. If you are using a
different interpreter on these platforms, you will need to make the appropriate adjustments.
Basically, the order of value assignment for any of the keywords is:
1) Use value from command line or from files sourced with CONFIG and DEFCFG
2) If not specified on command line, use value from TXT2PDFD
3) If not specified in TXT2PDFD (or TXT2PDFD not installed), use built in default
Once you‟ve made the desired modifications, place the EXEC where your particular interpreter will
find it. For Linux and Windows, this is usually somewhere in your PATH. On OS/390 and z/OS,
place the EXEC somewhere in your SYSEXEC or SYSPROC DD concatenation. On VM place the
exec on the same mini-disk as the TXT2PDF.
Translation tables as defined in the TXT2PDFX EXEC or via the XLATE parameter are used to
convert each input byte from whatever code page it was created with to the WinAnsiEncoding that
PDF uses.
The TXT2PDFX EXEC or EXEC specified via the XLATE parameter contains two translation tables
that are used to convert the text of the input file and the EXECs internal data to other code pages. This
was originally intended to convert EBCDIC data to ASCII, but has been externalized to allow you to
convert from any character set to another in case you need to distribute the output file to other
nationalities.
This EXEC is optional as there are default tables built into the main EXEC. Therefore, if you do not
require specific translations, skip these instructions and continue with the appropriate platform
instructions below.
If you want to use this EXEC you‟ll need to carefully modify the tables contained within. Each table is
256 values in length and each 2 character hexadecimal value represents a character in the target code
page. Each byte in the input file will be used as an offset into this table to get the value of the output
byte. For instance, if you look at the default table, you‟ll notice that at hex offset 40 a value of 20 is
given. This will convert the “space” character from EBCDIC to ASCII.
Once you‟ve made the desired modifications, place the EXEC where your particular interpreter will
find it. For Linux and Windows, this is usually somewhere in your PATH. On OS/390 and z/OS,
An alternative approach is to use Unicode Character Map (UCM) files via the ENCODING parameter
to define a mapping between each byte of the input data to their Unicode equivalent. An internal
representation of this mapping is embedded within the PDF, so the input bytes aren‟t actually
converted to Unicode and the viewing application will use the mapping to display the input bytes using
the mapped Unicode character. This method also provides proper cut and paste and text searching.
http://source.icu-project.org/repos/icu/data/trunk/charset/data/ucm/
Windows
Nothing special needs to be done if you‟ll be specifically invoking your interpreter to execute
TXT2PDF. However, if you wish to invoke TXT2PDF by simply typing its name, then you must do
the following:
1) Determine what extension has been defined to implicitly invoke the interpreter. For Regina,
this is usually REX.
2) Rename TXT2PDF to TXT2PDF.<extension> replacing <extension> with the value you
determined in step 1 above.
3) Copy the renamed EXEC to a directory in your PATH.
There are many choices when installing on this platform. If you are unfamiliar with the ISPF, REXX,
and LOADLIB standards in your shop, please consult your systems support personnel for assistance.
The TXT2PDF.EXEC, TXT2PDF.PANELS, and TXT2PDF.LOAD data sets will need to be made
available to your TSO logon PROC or the contents copied to the appropriate system data sets.
You may use TSO‟s ALTLIB command for the EXEC data set and ISPF‟s LIBDEF service for the
PANEL and LOAD data sets, or the LOAD data set may be allocated to STEPLIB or JOBLIB DD
statements. Another alternative would be to add the LOAD modules to a library in your LINKLIST or
LPA.
%
% Good old greenbar (green to my eyeball anyway .-))
%
% Created: 02/11/2002
% by: Leland Lucius
% pdf@homerow.net
%
% Form: 11.875x14
% Orientation: Landscape
% Requires: Font named "Courier"
%
%
% Setup
%
1 w % Line width
1.000 1.000 1.000 rg % Non-stroking color
0.780 0.860 0.780 RG % Stroking color
%
% Draw outside frame with rounded corners
%
31.500 720.000 m % Start at top/left
29.250 720.000 27.000 717.750 27.000 715.500 c % Draw corner
27.000 40.500 l % Line to bot/left
27.000 38.250 29.250 36.000 31.500 36.000 c % Draw corner
1039.500 36.000 l % Line to bot/right
1041.750 36.000 1044.000 38.250 1044.000 40.500 c % Draw corner
1044.000 715.500 l % Line to top/right
1044.000 717.750 1041.750 720.000 1039.500 720.000 c % Draw corner
31.500 720.000 l % Line to top/left
B % Fill and stroke
%
% Draw color bars
%
0.880 0.960 0.880 rg % Set color
36.000 684.000 999.000 36.000 re % Color Bar 1
36.000 612.000 999.000 36.000 re % Color Bar 2
36.000 540.000 999.000 36.000 re % Color Bar 3
36.000 468.000 999.000 36.000 re % Color Bar 4
36.000 396.000 999.000 36.000 re % Color Bar 5
36.000 324.000 999.000 36.000 re % Color Bar 6
36.000 252.000 999.000 36.000 re % Color Bar 7
36.000 180.000 999.000 36.000 re % Color Bar 8
36.000 108.000 999.000 36.000 re % Color Bar 9
36.000 36.000 999.000 36.000 re % Color Bar 10
%
% Draw inner verticals
%
36.000 720.000 m % Start at top
36.000 36.000 l % Line down to bot
1035.000 36.000 m % Start at bottom
1035.000 720.000 l % Line up to top
B % Fill and stroke
%
% Setup for text
%
% Draw the left side 6 LPI line numbers
%
1 0 0 1 29.5 723 Tm % Starting position
12 TL % Line spacing
(1)'(2)'(3)'(4)'(5)'(6)'(7)'(8)'(9)' % Write the first 9
1 0 0 1 27.5 615 Tm % Bump left a bit
(10)'(11)'(12)'(13)'(14)'(15)'(16)'(17)' % Write the rest
(18)'(19)'(20)'(21)'(22)'(23)'(24)'(25)' %
(26)'(27)'(28)'(29)'(30)'(31)'(32)'(33)' %
(34)'(35)'(36)'(37)'(38)'(39)'(40)'(41)' %
(42)'(43)'(44)'(45)'(46)'(47)'(48)'(49)' %
(50)'(51)'(52)'(53)'(54)'(55)'(56)'(57)' %
%
% Draw the right side 6 LPI line numbers
%
1 0 0 1 1037.5 722 Tm % Starting position
9 TL % Line spacing
(1)'(2)'(3)'(4)'(5)'(6)'(7)'(8)'(9)' % Write the first 9
1 0 0 1 1035.5 641 Tm % Bump left a bit
(10)'(11)'(12)'(13)'(14)'(15)'(16)'(17)' % Write the rest
(18)'(19)'(20)'(21)'(22)'(23)'(24)'(25)' %
(26)'(27)'(28)'(29)'(30)'(31)'(32)'(33)' %
(34)'(35)'(36)'(37)'(38)'(39)'(40)'(41)' %
(42)'(43)'(44)'(45)'(46)'(47)'(48)'(49)' %
(50)'(51)'(52)'(53)'(54)'(55)'(56)'(57)' %
(58)'(59)'(60)'(61)'(62)'(63)'(64)'(65)' %
(66)'(67)'(68)'(69)'(70)'(71)'(72)'(73)' %
(74)'(75)'(76)' %
ET % End text
%
% Draw the holes
%
0.95 0.95 0.95 rg % Hole color
0.85 0.85 0.85 RG % Hole border color
13.500 778.5 m % Left #1
11.250 778.5 9.000 776.25 9.000 774.00 c % Upper Left
9.000 771.75 11.250 769.5 13.500 769.5 c % Lower Left
15.750 769.5 18.000 771.75 18.000 774.00 c % Lower Right
18.000 776.25 15.750 778.5 13.500 778.5 c % Upper Right
1057.500 778.5 m % Right #1
1055.250 778.5 1053.000 776.25 1053.000 774.00 c % Upper Left
1053.000 771.75 1055.250 769.5 1057.500 769.5 c % Lower Left
1059.750 769.5 1062.000 771.75 1062.000 774.00 c % Lower Right
1062.000 776.25 1059.750 778.5 1057.500 778.5 c % Upper Right
13.500 742.5 m % Left #2
11.250 742.5 9.000 740.25 9.000 738.00 c % Upper Left
9.000 735.75 11.250 733.5 13.500 733.5 c % Lower Left
15.750 733.5 18.000 735.75 18.000 738.00 c % Lower Right
18.000 740.25 15.750 742.5 13.500 742.5 c % Upper Right
1057.500 742.5 m % Right #2
1055.250 742.5 1053.000 740.25 1053.000 738.00 c % Upper Left
1053.000 735.75 1055.250 733.5 1057.500 733.5 c % Lower Left
1059.750 733.5 1062.000 735.75 1062.000 738.00 c % Lower Right
1062.000 740.25 1059.750 742.5 1057.500 742.5 c % Upper Right
13.500 706.5 m % Left #3
11.250 706.5 9.000 704.25 9.000 702.00 c % Upper Left
9.000 699.75 11.250 697.5 13.500 697.5 c % Lower Left