home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Phoenix CD 2.0
/
Phoenix_CD.cdr
/
24b
/
lazer12.zip
/
LAZER.DOC
< prev
next >
Wrap
Text File
|
1988-10-31
|
9KB
|
336 lines
*************************************************************************
LAZER - Macro Typesetter for HP LaserJet++ and Compatibles
Version 1.2
(c) 1987 Jim Bumgardner
*************************************************************************
Revision History:
Version 1.2 05/88-10/88
Added IP (Include PCX graphic file)
Added IR (Include RAW printer commands)
Added proper TAB handling
Included Source Code in Archive
Included OKIPIE program in Archive
Version 1.1 12/87
Fixed the bugs in 1.0
*************************************************************************
The most recent version of this program can be found at
Cooper Works BBS 1-608-271-3685
*************************************************************************
You are hereby granted permission to use this program for
non-commericial pursuits, and to upload this archive to
bulletin boards. The author doesn't expect any donations or
tech support questions.
James Bumgardner
711 E. Cypress, Apt A.
Burbank, CA 91501
(818)846-7781 (PLINK BUM)
*******************************************************************
This Archive Contains:
LAZER.C Source Code
LAZER.EXE The Typesetting program.
LAZER.DOC What It Is
OKI.TXT Sample Header file for OKI LaserLine
FORM.TXT Sample Form
OKIPIE11.ARC OKIPIE Pie Graphing Program
*************************************************************************
This program processes ascii text files which contain special commands
in Brackets []. For example, you could use it to quickly insert some
boldface or italics into a text file. For example.
This is a regular sentance with some [!]boldface[!] and [/]italics[/].
Many, but not all, HP+ commands are supported. Some commands directly
translate into a corresponding HP command. Other commands are more
sophisticated, and actually do some useful things the printer can't
do. LAZER can perform these functions:
- Download soft fonts
- Read text from an "include" file (Nesting up to 16 levels).
** The file OKI.TXT is a special include file to assign font-ids
to the resident fonts on an OKI Laserline. You may want to use
this as a model for setting up your printer.
- Print graphics from a .PCX file or a straight bitmap.
- Make Lazer Output Files more understandable by allowing you to
insert comments.
- Make HPLJ macros easier to generate.
Many other programs I write generate their output in LAZER format, so
I can easily read their output and make small modifications. Since the
source-code is provided, you could potentially write a subset of LAZER
for other printers.
The OKIPIE program included in this archive generates hi-res pie graphs
in .PCX format. It typesets the piegraph using LAZER.
*************************************************************************
Sample Usage
------------
LAZER form.txt (This outputs to LPT1)
LAZER form.txt LPT2
or
LAZER form.txt 2 (This outputs to LPT2)
LAZER form.txt outfile (This outputs to a file)
Options
-------
-C# Number of Copies (Works with explicit
formfeeds only).
-N Don't download fonts.
Example:
LAZER -C2 form.txt Print two copies of form.txt
*************************************************************************
Command Glossary
----------------
Lazer files combine text and typesetting commands.
All Typesetting Commands are surrounded with []
To actually print a left square bracket, use [[.
To print this document using LAZER, replace all single left brackets with [[.
You can chain multiple commands in the same set of brackets, and put
white space (spaces,tabs,returns) between commands. Like so:
[ ; this is a comment
L1200,2300 ; Locate Cursor
F0 ; Font Zero
]
All filenames are surrounded with <>
[
L1200,1200 ; Locate Cursor
IP150<piechart.map> ; Print .PCX graphic at 150 resolution
]
Basic Commands
--------------
LAZER IS case-senstive for the first letter of most commands.
[E] Escape
This sends an escape to your printer, allowing you to use
escape codes LAZER doesn't support.
[^x] Control Characters
Same Idea.
[F#] Select Font
[F#<file>] Download Font
Examples:
[F0] (select font # 0)
[F2<OPT10.SFP>] (download opt10.sfp as font # 2).
Font Filenames default to .SFP
[A#] Assign Font-ID
Assigns a Font-ID to the last descibed Font - useful for assigning
IDs to resident and cartridge fonts. After assigning a font id,
you may use the [F#] command to select that font.
[H#] Select Pitch Specify characters per inch.
[V#] Select Point Size Specify points (1/72")
[(xx] Select Symbol Set (e.g. [(OU] )
[T#] Type Face (0-10)
[P#] Spacing: 0 - fixed, 1 - proportional, -1 Compressed Prop
[O#] Orientation: Landscape [O1] Portrait [O0]
You not combine landscape and portrait on the same page.
These commands remain in effect until turned off - be sure to
reset at the next page, if desired.
[D#] Lines Per Inch Specify lines per inch
[!] Bold Toggle Example: He was a [!]bad[!] boy.
[/] Italic Toggle
[_] Underline Toggle
[M?#] Set Margin
l left margin in columns
r right margin in columns
t top margin in lines
Examples:
[Ml10 ; Set left margin to 10th column]
[Mc] Clear Margins
[f] FormFeed
Graphics
--------
[L#,#] Locate X,Y
[L,#] Locate Y
[L#] Locate X
Locate cursor at XX-YY coordinates (1/720" increments)
X and Y values may be offsets (use + and - signs).
Examples:
[L0,0] (Locate at home position)
[L+720] (Locate an inch to the right)
[LS] Push Cursor
[LR] Pop Cursor
You may save and restore the cursor position mutliple times on
a Last in First out basis.
[G#] Set Grey Scale
This command sets a grey scale for drawing lines and boxes.
The grey scale value is independent from the pattern value.
Specify 1-100.
[p#] Set Pattern
This command sets up a pattern for drawing lines and boxes. See
your printer manual for examples.
1 Horizontal Lines
2 Vertical Lines
3 Diagonal to upper right.
4 Diagonal to lower right
5 1+2 Criss Cross
6 3+4 Criss Cross
[R?##,##] Print Rule (Lines and Boxes)
s or b Solid
g Grey Scale
p Pattern
##,## Height and Width in 1/720" increments
Examples:
[
; Draw a little shaded box
LS
L,-150 Rb385,2 Rb2,150 Rg385,150
L,+150 Rb385,2
L+385,-150 Rb2,150
LR
]
Control and Macros
------------------
[N+] Ignore Returns
Causes CR-LFs outside of brackets to be ignored. This is useful
for making complex forms more readable.
[N-] Don't Ignore Returns
[I<file>] Include File
Starts reading commands from the specified file. Good for standard
letter heads, etc. Often, include files will contain a series
of macros (see below). After the file is read, control is transfered
back to the original file. You may nest up to 16 levels.
Include filenames default to .TXT
[IR<file>] Include Raw File (RAW)
This downloads the contents of a file to the printer without any
special processing. Extension defaults to ".PRN".
[*{#] Start Macro
[*}] End Macro
[*#] Execute Macro
The first two commands define a "Macro", a set of commands which are
identified by number, and then can be executed over and over again.
Between these two commands, place all the instructions or text you want
the macro to perform. Macros are stored by the printer, and will
execute faster then sending the same text over again.
Example:
[ ; 3 macros used for drawing dip-switch boxes
; Down switch
*{1 LS L+12,-100 RB2,100 L-12,+74 RB25,25 LR L+45 *}
; Up switch
*{2 LS L,-100 RB26,26 L+12 RB2,100 LR L+45 *}
; Surrounding Box
*{3 LS L,+25 L,-150 RB385,2 RB2,150
L,+150 RB385,2 L+385,-150 RB2,150 LR L+20 *}
]
[_]Okidata 182 Settings[_]
SW1 [*3*1*2*2*2*1*2*1*1]
[H16]12345678[H10]
SW2 [*3*1*1*1*1*2*1*2*1]
[H16]12345678[H10]
Raster Graphics
---------------
[IB<file>] Print Bitmap at default resolution
[IB#<file>] Print Bitmap at particular resolution (75,150,300)
[IBI<file>] Print Bitmap Inverted
[IP<file>] Print PCX File
[IPI<file>] Print PCX Inverted (white <-> black)
[IPI#<file>] Print PCX Inverted at particular resolution (75,150,300)
A bitmap is a file with a picture in it. The first 4 bytes contain
the bitmap's dimensions (Horizontal , Vertical). The rest of the
file is the bitmap. The bitmap is read in at the current cursor
position.
PCX files are generated by PC Paintbrush, and some other programs.
LAZER has only been tested with monochrome PCX files.
You may optionally specify a resolution (300, 150 or 75 dpi).
300, or the last reso used, is the default.
You may optionally specify I to invert the bitmap colors.
Bitmap Filenames default to .MAP
PCX filenames default to .PCX
Examples:
[
L750,750 IPI150<picture>
L4000,4000 IB<bitmap>
]
** END OF DOCUMENTATION **