Hjem Op WinProxy & Citrix MF FTP - hvordan? Hardware PCL koder

 

Hewlett-Packard Laser and DeskJet Printer Escape Code Sequences

Collected and annotated by W.C. Parke, 1991. Edited and converted to html by R.P. Bagnall, 1996.

The Hewlett-Packard escape code sequences are also known as HPPCL, HP Printer Code Language.

There are two forms of HPPCL escape code sequences:

bulletTwo Character Escape Sequences have their second byte in range 48-126.
bulletOtherwise, they are Parameterized Escape Sequences:
Second byte
Parameterized Character in range 33-47
!"#$%&'()*+,-./
Third byte
Group Character in range 96-126
`abcdefghijklmnopqrstuvwxyz{|}~
Value field
Decimal characters which may be preceded by "+" or "-" and may contain a decimal fraction. No value means 0.
Parameter
Character in range 96-126; specified how value field acts; acts as termination character if in range 64-94.
@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^
Data (optional)
Binary data; number of bytes specified in value field.

HPPCL, sorted by parameterized byte and terminating parameter

    &a  #C      Cursor Horizontal Position - Columns
    &a  0G      Page Side Selection Next Side
    &a  1G      Page Side Selection Front Side
    &a  2G      Page Side Selection Back Side
    &a  #H      Cursor Horizontal Position - Decipoints
    &a  #L      Job Margin Left column #
    &a  #M      Job Margin Right column #
    &a  0P      Job Character Rotate   0x
    &a 90P      Job Character Rotate  90x
    &a180P      Job Character Rotate 180x
    &a270P      Job Character Rotate 270x
    &a  #R      Cursor Vertical Position - Rows
    &a  #V      Cursor Vertical Position - Decipoints
    &d   @      Font Underline Off
    &d   D      Font Underline Enable
    &d  0D      Font Underline Enable Fixed
    &d  1D      Font Underline Single Fixed
    &d  2D      Font Underline Double Fixed
    &d  3D      Font Underline Single Float
    &d  4D      Font Underline Double Float
    &f  0S      Macro Cursor Push position
    &f  1S      Macro Cursor Pop position
    &f  0X      Macro Start Definition
    &f  1X      Macro Stop Definition
    &f  2X      Macro Execute
    &f  3X      Macro Call
    &f  4X      Macro Enable Overlay #
    &f  5X      Macro Disable Overlay #
    &f  6X      Macro Delete All
    &f  7X      Macro Delete All Temp
    &f  8X      Macro Delete One Macro #
    &f  9X      Macro Make Temp
    &f 10X      Macro Make Permanent
    &f  #Y      Macro Set New ID #
    &k  0E      Job Line-by-Line Enhance ON
    &k  1E      Job Line-by-Line Enhance OFF
    &k  0F      Job Line-by-LIne SI/SO ON
    &k  1F      Job Line-by-Line SI/SO OFF
    &k  0G      Job Line Termination Normal
    &k  1G      Job Line Termination CR=CR+LF
    &k  2G      Job Line Termination LF=FF=CR+LF
    &k  3G      Job Line Termination CR=LF=FF=CR+LF
    &k  #H      Cursor Horizontal Motion Index #/120" incr.
    &k  0S      Font Pitch 10.00
    &k  2S      Font Pitch 16.66
    &k  0W      Job Print Left to Right
    &k  1W      Job Print Bidirectional
    &k  2W      Job Print Right to Left
    &k  5W      Job Print Text Scale OFF
    &k  6W      Job Print Text Scale ON
    &l  0A      Job Paper Default size
    &l  1A      Job Paper Size Executive
    &l  2A      Job Paper Size Letter
    &l  3A      Job Paper Size Legal
    &l 26A      Job Paper Size A4
    &l 80A      Job Paper Size Monarch
    &l 81A      Job Paper Size Commercial #10 envelope
    &l 90A      Job Paper Size International DL envelope
    &l 91A      Job Paper Size International C5 envelope
    &l  #C      Cursor Vertical Motion Index #/48" incr.
    &l  #D      Cursor Lines per inch # (1,2,3,4,6,8,12,16,24,48)
    &l  #E      Job Margin Top # of lines
    &l  #F      Job Margin Text Length # of lines
    &l  1G      Job Paper Destination Upper Bin
    &l  2G      Job Paper Destination Rear Bin
    &l  0H      Job Paper Page Eject
    &l  1H      Job Paper Source from Upper Tray
    &l  2H      Job Paper Input Manual Feed from Tray
    &l  3H      Job Paper Input Manual Feed Envelope
    &l  4H      Job Paper Source from Lower Tray
    &l  6H      Job Paper Envelope Feeder
    &l  0L      Job Paper Perf Skip Off
    &l  1L      Job Paper Perf Skip On
    &l  0O      Job Page Orientation Portrait
    &l  1O      Job Page Orientation Landscape
    &l  2O      Job Page Orientation Reverse Portrait
    &l  3O      Job Page Orientation Reverse Landscape
    &l  #P      Job Page Length # of lines
    &l  0S      Job Page Simplex
    &l  1S      Job Page Duplex Long-Edge Binding
    &l  2S      Job Page Duplex Short-Edge Binding
    &l  1T      Job Separation
    &l  #U      Job Margin Left Offset # in 1/720"
    &l  #X      Job Paper Number of Copies (ESC,ESC,&l#X)
    &l  #Z      Job Margin Top Offset # in 1/720"
    &p  #X{data}Job Print Data Transparent # bytes
    &s  0C      Cursor Line Wrap On
    &s  1C      Cursor Line Wrap Off
    (   #@      Font Primary Default ID #
    (   0@      Font Primary Default CharSet
    (   2@      Font Primary Current CharSet
    (   3@      Font Primary Default Active
    (   0A      Font Primary Math Symbol set
    (   0B      Font Primary Line Draw Symbol set
    (   0D      Font Primary ISO 60: Norway v.1
    (   1D      Font Primary ISO 61: Norway v.2
    (   0E      Font Primary HP Roman Extension
    (   1E      Font Primary ISO UK
    (   0F      Font Primary ISO 25: French
    (   1F      Font Primary ISO 69: France
    (   0G      Font Primary HP German
    (   1G      Font Primary ISO 21: Germany
    (   8G      Font Primary ISO HP Greek8
    (   0I      Font Primary ISO 15: Italy
    (   6J      Font Primary Microsoft Publishing
    (   7J      Font Primary DeskTop
    (  10J      Font Primary PS Text
    (  13J      Font Primary Ventura International
    (  14J      Font Primary Ventura US
    (   0K      Font Primary ISO 14: JIS ASCII
    (   1K      Font Primary ISO HP Katakana
    (   2K      Font Primary ISO 57: Chinese
    (   8K      Font Primary Kana-8 Symbol set
    (   0L      Font Primary JIS Line Draw
    (  10L      Font Primary PS ITC Zapf Dingbats
    (  11L      Font Primary ITC Zapf Dingbats Series 100
    (  12L      Font Primary ITC Zapf Dingbats Series 200
    (  13L      Font Primary ITC Zapf Dingbats Series 300
    (   0M      Font Primary JIS Math7
    (   1M      Font Primary Technical
    (   5M      Font Primary Technical PS Math
    (   6M      Font Primary Technical Ventura Math
    (   8M      Font Primary JIS Math8
    (   0N      Font Primary ISO100: ECMA-94 Latin 1
    (   0O      Font Primary OCR-A
    (   1O      Font Primary OCR-B
    (   0Q      Font Primary JIS Math8a
    (   1Q      Font Primary JIS Math8b
    (   2Q      Font Primary JIS PIFonta
    (   0S      Font Primary ISO 11: Swedish
    (   1S      Font Primary HP Spanish
    (   2S      Font Primary ISO 17: Spain
    (   3S      Font Primary ISO 10: Sweden: Names
    (   4S      Font Primary ISO 16: Portugal
    (   5S      Font Primary ISO 84: Portugal
    (   6S      Font Primary ISO 85: Spanish
    (   0U      Font Primary ISO  6: ASCII
    (   1U      Font Primary JIS Legal
    (   2U      Font Primary ISO  2: IRV
    (   7U      Font Primary OEM-1
    (   8U      Font Primary Roman 8 Symbol set
    (   9U      Font Primary ANSI Symbol set
    (  10U      Font Primary PC-8 symbol set
    (  11U      Font Primary PC-8 Denmark/Norway
    (  12U      Font Primary PC-8 50
    (  15U      Font Primary JIS Pi Font
    (   #X      Font Primary Download Select ID #
    (s  0B      Font Primary Stroke Weight Normal
    (s -7B      Primary Font Stroke Weight Ultra Thin
    (s -6B      Primary Font Stroke Weight Extra Thin
    (s -5B      Primary Font Stroke Weight Thin
    (s -4B      Primary Font Stroke Weight Extra Light
    (s -3B      Primary Font Stroke Weight Light
    (s -2B      Primary Font Stroke Weight Demi Light
    (s -1B      Primary Font Stroke Weight Semi Light
    (s  0B      Primary Font Stroke Weight Medium (book or text)
    (s  1B      Primary Font Stroke Weight Semi Bold
    (s  2B      Primary Font Stroke Weight Demi Bold
    (s  3B      Primary Font Stroke Weight Bold
    (s  4B      Primary Font Stroke Weight Extra Bold
    (s  5B      Primary Font Stroke Weight Black
    (s  6B      Primary Font Stroke Weight Extra Black
    (s  7B      Primary Font Stroke Weight Ultra Black
    (s  #H      Font Primary Pitch  (10,12,16.66)
    (s  0P      Font Primary Spacing Fixed
    (s  1P      Font Primary Spacing Proportional
    (s  1Q      Font Primary Draft Quality
    (s  2Q      Font Primary Letter Quality
    (s  0S      Font Primary Type Style: Upright
    (s  1S      Font Primary Style Italic
    (s  4S      Font Primary Style Condensed
    (s  5S      Font Primary Style Condensed Italic
    (s  8S      Font Primary Style Compressed (Extra Condensed)
    (s 24S      Font Primary Style Expanded
    (s 32S      Font Primary Style Outline
    (s 64S      Font Primary Style Inline
    (s128S      Font Primary Style Shadowed
    (s160S      Font Primary Style Sutline Shadowed
    (s  #T      Font Primary Typeface CG Times (#= 4101)
    (s  #T      Font Primary Typeface Univers  (#= 4148)
    (s  0T      Font Primary Typeface Line Printer
    (s  1T      Font Primary Typeface Pica
    (s  2T      Font Primary Typeface Elite
    (s  3T      Font Primary Typeface Courier
    (s  4T      Font Primary Typeface Helvetica
    (s  5T      Font Primary Typeface Times Roman
    (s  6T      Font Primary Typeface Gothic
    (s  7T      Font Primary Typeface Script
    (s  8T      Font Primary Typeface Prestige
    (s 11T      Font Primary Typeface Presentations
    (s 17T      Font Primary Typeface Optima
    (s 18T      Font Primary Typeface ITC Garamond
    (s 19T      Font Primary Typeface Cooper Black
    (s 20T      Font Primary Typeface Coronet Bold
    (s 21T      Font Primary Typeface Broadway
    (s 22T      Font Primary Typeface Bodini Condensed
    (s 23T      Font Primary Typeface Century School
    (s 24T      Font Primary University Roman
    (s 32T      Font Primary Typeface Brush
    (s 61T      Font Primary Typeface Dom Casual
    (s 85T      Font Primary Typeface Univers Conden.
    (s  0U      Font Primary Typeface Normal
    (s +1U      Font Primary Super
    (s -1U      Font Primary Sub
    (s  #V      Font Primary Character Height # of 1/72"
    (s  #W{data}Font Download Character # Bytes
    )   #@      Font Secondary Default ID #
    )   0@      Font Secondary Default CharSet
    )   2@      Font Secondary Current CharSet
    )   2@      Font Secondary Current CharSet
    )   3@      Font Secondary Default Active
    )   0A      Font Secondary Math Symbol set
    )   0B      Font Secondary Line Draw Symbol set
    )   0D      Font Secondary ISO Norway v.1
    )   1D      Font Secondary ISO Norway v.2
    )   0E      Font Secondary HP Roman Extension
    )   1E      Font Secondary ISO UK
    )   0F      Font Secondary ISO 25: French
    )   1F      Font Secondary ISO 69: France
    )   0G      Font Secondary HP German
    )   1G      Font Secondary ISO 21: Germany
    )   8G      Font Secondary HP Greek8
    )   0I      Font Secondary ISO Italy
    )   0K      Font Secondary JIS ASCII
    )   1K      Font Secondary HP Katakana
    )   2K      Font Secondary ISO 57: Chinese
    )   8K      Font Secondary Kana-8 Symbol set
    )   0L      Font Secondary JIS Line Draw
    )   0M      Font Secondary JIS Math7
    )   1M      Font Secondary Technical
    )   8M      Font Secondary JIS Math8
    )   0N      Font Secondary ECMA-94 Latin 1
    )   0O      Font Secondary OCR-A
    )   1O      Font Secondary OCR-B
    )   0Q      Font Secondary JIS Math8a
    )   1Q      Font Secondary JIS Math8b
    )   2Q      Font Secondary JIS PIFonta
    )   0S      Font Secondary ISO 11: Swedish
    )   1S      Font Secondary HP Spanish
    )   2S      Font Secondary ISO Spain
    )   3S      Font Secondary ISO Sweden: Names
    )   4S      Font Secondary ISO Portugal
    )   5S      Font Secondary ISO 84: Portuguese
    )   6S      Font Secondary ISO 85: Spanish
    )   0U      Font Secondary ISO  6: ASCII
    )   1U      Font Secondary JIS Legal
    )   2U      Font Secondary ISO IRV
    )   7U      Font Secondary OEM-1
    )   8U      Font Secondary Roman 8 Symbol set
    )   9U      Font Secondary ANSI Symbol set
    )  10U      Font Secondary PC-8 symbol set
    )  11U      Font Secondary PC-8 Denmark/Norway
    )  12U      Font Secondary PC-850
    )  15U      Font Secondary JIS PIFont
    )   #X      Font Secondary Download Select ID #
    )s  0B      Font Secondary Stroke Weight Normal
    )s  3B      Font Secondary Stroke Weight Bold
    )s  7B      Font Secondary Stroke Weight Extra Bold
    )s -3B      Font Secondary Light
    )s  #H      Font Secondary Pitch  )10,12,16.66)
    )s  0P      Font Secondary Spacing Fixed
    )s  1P      Font Secondary Spacing Proportional
    )s  1Q      Font Secondary Draft Quality
    )s  2Q      Font Secondary Letter Quality
    )s  0S      Font Secondary Type Style: Upright
    )s  1S      Font Secondary Style Italic
    )s  #T      Font Secondary Typeface CG Times (#= 4101)
    )s  #T      Font Secondary Typeface Univers  (#= 4148)
    )s  0T      Font Secondary Typeface Line Printer
    )s  1T      Font Secondary Typeface Pica
    )s  2T      Font Secondary Typeface Elite
    )s  3T      Font Secondary Typeface Courier
    )s  4T      Font Secondary Typeface Helvetica
    )s  5T      Font Secondary Typeface Times Roman
    )s  6T      Font Secondary Typeface Gothic
    )s  7T      Font Secondary Typeface Script
    )s  8T      Font Secondary Typeface Prestige
    )s 11T      Font Secondary Typeface Presentations
    )s 17T      Font Secondary Typeface Optima
    )s 18T      Font Secondary Typeface ITC Garamond
    )s 19T      Font Secondary Typeface Cooper Black
    )s 20T      Font Secondary Typeface Coronet Bold
    )s 21T      Font Secondary Typeface Broadway
    )s 22T      Font Secondary Typeface Bodini Condensed
    )s 23T      Font Secondary Typeface Century Schoolbook
    )s 24T      Font Secondary Typeface University Roman
    )s 32T      Font Secondary Typeface Brush
    )s 61T      Font Secondary Typeface Dom Casual
    )s 85T      Font Secondary Typeface Univers Conden.
    )s  0U      Font Secondary Typeface Normal
    )s +1U      Font Secondary Super
    )s -1U      Font Secondary Sub
    )s  #V      Font Secondary Character Height # of 1/72"
    )s  #W{data}Font Download Create Font Header # Bytes
    *b  0M      Graphics Compaction OFF
    *b  1M      Graphics Compaction Mode 1
    *b  2M      Graphics Compaction Mode 2
    *b  3M      Graphics Compaction Delta Row
    *b  #W{data}Graphics Transfer # Bytes
    *b  #X      Graphics X Offset # dots
    *b  #Y      Graphics Y Offset # dots
    *c  #A      Graphics Rectangle Horizontal Size-Dots
    *c  #B      Graphics Rectangle Vertical Size-Dots
    *c  #D      Font Download Assign ID #
    *c  #E      Font Download ASCII Code #
    *c  0F      Font Download Delete All
    *c  1F      Font Download Delete Temp
    *c  2F      Font Download Delete Last
    *c  4F      Font Download Make Temp
    *c  5F      Font Download Make Perm
    *c  6F      Font Assign Current as Temp
    *c  #G      Rectangle Shade 2,10,15,30,45,70,90,100%
    *c  1G      Rectangle Pattern Horizontal Lines
    *c  2G      Rectangle Pattern Vertical Lines
    *c  3G      Rectangle Pattern Diagonal + Lines
    *c  4G      Rectangle Pattern Diagonal - Lines
    *c  5G      Rectangle Pattern Square Lines
    *c  6G      Rectangle Pattern Crosshatch Lines
    *c  #H      Rectangle Size Horizontal Decipoints
    *c  #K      HPCL Plot Horizontal Size
    *c  #L      HPCL Plot Vertical Size
    *c  0P      Rectangle Fill Black
    *c  1P      Rectangle Fill White (IIP-III)
    *c  2P      Rectangle Fill Shading
    *c  3P      Rectangle Fill Pattern
    *c  5P      Rectangle Fill Current Pattern
    *c  0T      Set Picture Frame Anchor to cursor position
    *c  #V      Rectangle Size Vertical Decipoints
    *p  #X      Cursor Horizontal Position - Dots
    *p  #Y      Cursor Vertical Position - Dots
    *r  0A      Graphics Start Left Margin
    *r  1A      Graphics Start Current Cursor
    *r   B      Graphics End
    *r  0F      Graphics Presentation Rotate Image
    *r  3F      Graphics Laserjet Landscape Compatible
    *r   K      Job Printer Model Number Return
    *r  0Q      Graphics Set to default
    *r  1Q      Graphics Set Quality draft
    *r  2Q      Graphics Set to high
    *r  #S      Graphics Width # pixels
    *r  #T      Graphics Raster Height in raster rows
    *t 75R      Graphic Resolution  75 pixels/inch
    *t100R      Graphic Resolution 100 pixels/inch
    *t150R      Graphic Resolution 150 pixels/inch
    *t300R      Graphic Resolution 300 pixels/inch
    *v  0N      Job Print Source Transparent
    *v  1N      Job Print Source Opaque
    *v  0O      Job Print Pattern Transparent
    *v  1O      Job Print Pattern Opaque
    *v  0T      Job Print Pattern - Black
    *v  1T      Job Print Pattern - White
    *v  2T      Job Print Pattern - Shading
    *v  3T      Job Print Pattern - Cross Hatch
    %   0A      Enter PCL Mode using prior PCL cursor position
    %   1A      Enter PCL Mode using current HPGL position
    %   0B      Enter HPGL Mode using prior HPGL cursor position
    %   1B      Enter HPGL Mode using current PCL position
    9           Job Margin Clear Horizontal
    =           Cursor Half Line Feed
    E           Job Printer Reset
    Y           Job Display Function On
    z           Job Printer Self-Test
    Z           Job Display Function Off



Font Downloading

  1. Send assigned font ID number.
  2. Send font descriptor.
  3. Send character code.
  4. Send character descriptor.

Font descriptor

Offset Len Name Notes LJ DJ
0 1 Font descriptor size   40 48*
2 1 Reserved   00 00
3 1 Font Type
bullet0 7-bit (32-127 printable)
bullet1 8-bit (32 to 127 and 160-255 printable)
bullet2 PC-8 (all printable except 0,7,15,27)
bulletTo access unprintable characters, use Print Data Transparent.
00 05
4 2 Reserved   0000 0000
6 2 Baseline Distance (unsigned integer) Distance from top of cell to baseline (from 0 to cell height in dots minus 1). 2600 2600
8 2 Cell Width (unsigned word) Width of cell in dots. 1900 3200*
10 2 Cell Height (unsigned word) Height of cell in dots. 3200 3200
12 1 Orientation (unsigned byte) Orientation of font (0=portrait, 1=landscape) 00 00
13 1 Spacing (byte) Spacing of font
bullet0=fixed
bullet1=proportional
00 00
14 2 Symbol Set (unsigned word) Symbol set for this font (value field times 32 + ASCII decimal value of termination character - 64); range 0 to 2047. HP uses 0 to 1023. Termination characters can be "A" to 'V". 1500 1500
16 2 Pitch (default HMI) (unsigned word) Pitch of font in quarter-dots. Defines default HMI for font. Range: 0 to 16800. 6400 6400
18 2 Height (unsigned word) Heigth of font in quarter-dots. Value is converted to points (1/720"=1 pt). Range: 0-10922. C700 C700
20 2 xHeight (unsigned word) Height of lower case "x" in quarter-dots. (Ignored by HP LJ Series II, ...) 6400 6400
22 1 Width Type (signed byte) Proportionate width of characters in font. (Ignored by HP LJ Series II, ...)
bullet-2=condensed
bullet-1=semi-condensed
bullet0=normal
bullet1=semi-expanded
bullet2=expanded
00 00
23 1 Style (unsigned byte) Style of font; 0=upright, 1=italics 00 00
24 1 Stroke Weight (signed byte): Thickness of strokes; (-7 to 7; standard is 0, bold is 3, light is -3). 06 06
25 1 Typeface
bullet0 LinePrinter
bullet3 Courier
bullet4 Helv
bullet5 TmsRmn
bullet6 LetterGothic
bullet8 Prestige
bullet11 Presentations
bullet17 Optima
bullet18 Garamond
bullet19 CooperBlack
bullet20 CoronetBold
bullet21 Broadway
bullet22 BauerBodoniBlackCondensed
bullet23 CenturySchollbook
bullet24 UniversityRoman
03 03
26 1 Reserved   00 00
27 1 Serif Style (unsigned byte): (Ignored by LJ II,...)
bullet0 Sans Serif Square
bullet1 Sans Serif Round
bullet2 Serif Line
bullet3 Serif Triangle
bullet4 Serif Swath
bullet5 Serif Block
bullet6 Serif Bracket
bullet7 Rounded Bracket
bullet8 Flair Stroke
00 00
28 2 Reserved ** dj **   0000 0002*
30 1 Underline Distance (signed byte) Distance from baseline to top dot row of underline in dots. 0=at baseline, positive=above baseline. 02 02
31 1 Underline Height (unsigned byte) Thickness of underline in dots. (LJ II is always set to 3 dots.) F6 F6
32 2 Text Height (unsigned word) Font's optimum inter-line spacing, in quarter-dots. (Ignored by LJ II) EF00 EF00
34 2 Text Width (unsigned word) Font's optimum character spacing in quarter-dots. (Ignored by LJ II) 6400 6400
36 2 Reserved   2000 2100*
38 2 Reserved   7F00 7F00
40 1 Pitch Extended (unsigned byte) Extends pitch an extra eight bits. Value is in 1024ths of one dot. E.g. 17 pitch: Pitch=70 (17.5 dots) and Pitch Extended=150 (0.1465 dots additional). 41 41
41 1 Height Extenced (unsigned byte) Extends height an extra eight bits. Value is 1024th of one dot. 00 00
42 2 Reserved   0000 0000
44 2 Reserved   0000 0000
46 2 Reserved   0000 0000
48-63   Font Name (ASCII) String for font name.

Character Descriptor

Offset Len Name Notes LJ DJ
0 1 Format (unsigned byte): Format of the character descriptor byte. 04 05
1 1 Continuation (Boolean): 0=data is character descriptor block, or 1=continuation of data associated with previous character descriptor (for large descriptors exceeding 32,767 bytes (max of value field). If so, bytes from 2 are character data. 00 00
2 1 Descriptor Size (unsigned byte): Size of character descriptor, in bytes. 14 06
3 1 Class (Char.Type) (unsigned byte): Format of character data. 01 00
4 1 Orientation (unsigned byte): 0=portrait, 1=landscape; must match font.
5 1 Reserved
6 2 Left Offset (unsigned word): Distance from left of physical page, in dots. (range: -4200 to 4200)
8 2 Top Offset (unsigned word): Distance from top of physical page, in dots. (range: -4200 to 4200)
10 2 Character Width (unsigned word): Width of character in dots. (Range: 1 to 4200). Cannot extend beyond cell boundary, as specified in font descriptor.
12 2 Character Height (unsigned word): Height of character in dots. (Range: 1 to 4200). Cannot extend beyond cell boundary.
14 2 Delta X (signed word): Number of quarter-dots by which horizontal position will be incremented after printing character. Used for proportional spaced characters. (Range: 0 to 16800)
16   Character Data Dot-per-bit image; in rows; left-to-right, parallel to raster scan; zero-bit filled to make an integral number of bytes.

 

How to Create, Recall and Print a Downloaded Macro


This procedure is normally used when printing from a DOS based program, or when using the Generic/Text Only or Standard/Text Only Drivers with a Windows based program.

The advantage of loading a graphic image into printer memory, as a Macro and recalling it using escape sequences, is that it is faster than sending the graphic image to the printer each time. Graphic images normally contain large amounts of data, which take a long time to be transmitted from computer to printer. Having the graphic image already in printer memory as a Macro will eliminate this transmission time.

Creating a Macro (Graphic)

  1. Choose the correct printer driver.
    To create a macro (graphic) in the correct format (print file format) you must make sure you are using the HP DeskJet 500 printer driver, or the Rena printer driver in the Windows program (Paint, Paint Shop Pro, MS Word …) you are using to create the graphic.

    NOTE: Please remember that the HP DeskJet 500 driver in Windows 95 has bugs in it. To correct this problem, after installing the Windows 95 DeskJet 500 printer, from the Windows 95 CD, copy the hpdskjet.drv file from our web site (www.renausa.com), to your Windows/System sub-directory of your Windows 95 system. This will over-write the existing hpdskjet.drv file in Windows 95 and fix the bugs. This hpdskjet.drv file can also be obtained from Windows 3.1x disks.

     

  2. Make sure the macro is small enough to be stored and printed by the printer.
    The DA606/607 can store and print a macro that is the maximum dimension of 2,800 square mm (~53mm X 53mm or ~2in. X 2in.).
    The DA608/610/612*/613*/615 can store and print a macro that is the maximum dimensions of 10,000 square mm (100mm X 100mm or 4in X 4in).
    This means if you download a macro that is larger than this area, the printer will either cut off the parts that exceed this area or display the "Macro too long" Error upon download. Some experimenting is normally needed, to make the graphic and *.prn file the proper size.

    NOTE: The file size has little to do with the actual printed size. One of the things that make a major difference to the file size, but not image size, is the resolution of the graphic.

    I have found MS Word (Version 7.0 or earlier) to be a useful tool when trying to change the graphic’s image size. You can import your graphic into Word. Choose the DeskJet 500 or Rena driver. Zero out your page margins, (If using the DeskJet 500 you must use the minimum margins set by the driver, or part of your image will be cut off.). Position the graphic in the upper left corner of the page. Using the re-sizing functions of Word, you can reduce or enlarge the image very easily, by dragging one of the box corners. Than print the image to a file from MS Word.
     

  3. Print the graphic to a file.
    This is done by clicking on the "print to file" box, normally found under the Print function of the program. Make sure you use no more than 8 characters to identify the file. This will produce a *.prn file on your hard drive, or floppy disk, (depending where you directed the file to be saved).
     

  4. Copy the *.prn file to your RENASET directory.

Downloading the Macro to the printer.

  1. Open the RENASET program (V4.0 or higher).
     

  2. Choose the appropriate printer (DA606/607/608/610/612*/613*/615) and choose the feature labeled MACRO. The RENASET program will ask you for the file name (*.prn) and ID #. Make sure you enter the file name exactly as you saved it in the RENASET directory. Make sure you record the ID# you assign to the macro. The ID# can be any number from 1-3000. If you want to download more than one macro, make sure you assign each of them a different ID#.
    Note: Turning the printer off will remove any downloaded Macros from memory.

Control Sequences for Recalling and printing a Downloaded Macro

Recalling the Macro (Printing the Macro).

After downloading a macro, (via the RENASET program V4.0), send the following escape sequence to the printer, at or before the position you would like the macro to be printed at, on the mail-piece.

Esc&f#y3X

Or

%1B&f#y3X

(Make sure you turn the printer’s Hex to ASCII feature ON.)

The # is, the macro ID number, that you assigned to the macro when you downloaded it to the printer using the RENASET program.

NOTE:

By assigning each macro a different ID#, you can download and recall more than one macro at a time with the DA608/610/612*/613*/615 printers. Since the DA606/607’s standard memory is more limited than the other models, it may be necessary to add additional memory to the DA606/607 if you would like to download and recall more than one macro at a time.

Example: (Recalling and printing a macro with the ID# of 123 and an address.)

%1B&f123y3X
Rena Systems Inc.
136 Green Tree Rd.
Oaks, PA 19456-1069

Positioning the Macro

You can also send positioning commands, for the macro.

Esc*p#x#Y

Or

%1B*p#x#Y

(Make sure you turn the Printer’s Hex to ASCII feature ON)

The # is the location in dot positions (cursor position), calculated from the printer’s zero margin position, vertically and horizontally.

x = horizontal position

Y = vertical position.

Example: (Recalling and printing a macro, with ID# 123, 100 dots over from the printer’s zero left margin and 50 dots down from the printer’s zero top margin.)

%1B*p100x50Y%1B&f123y3X

 

 

 

Other info:

Hewlett Packard Laserjet Printer Control Codes

Printer Control and Orientation
ESC E Reset printer
ESC z Self Test
ESC &l0O Portrait orientation
ESC &l1O Landscape orientation
ESC (s0P Select fixed space font
ESC (s1P Select proportional font
ESC (s0S Set upright character orientation
ESC (s1S Set Italic character orientation
ESC &l#X Select '#' number of copies
ESC &l0H Eject page
ESC &l1H Feed paper from tray
ESC &l2H Feed paper manually
ESC &l3H Feed envelope
ESC &l0T Default stacking position
ESC &l1T Togglestacking position

8 Bit Symbol Set Selection
ESC (8U Select Roman 8 symbol set
ESC (8K Select Kana 8 symbol set
ESC (8M Select Math 8 symbol set

7 Bit Symbol Set Selection
ESC (0U Select USASCII symbol set
ESC (0B Select Line Draw symbol set
ESC (0A Select Math symbol set
ESC (0M Select Math 7 symbol set
ESC (0Q Select Math 8a symbol set
ESC (1Q Select Math 8b symbol set
ESC (1U Select US Legal symbol set
ESC (0E Select Roman Extension symbol set
ESC (0D Select ISO Denmark/Norway symbol set
ESC (1E Select ISO United Kingdom symbol set
ESC (0F Select ISO France symbol set
ESC (0G Select ISO German symbol set
ESC (0I Select ISO Italy symbol set
ESC (0S Select ISO Sweden/Finland symbol set
ESC (1S Select ISO Spain symbol set
ESC (15U Select PiFont symbol set
ESC (2Q Select PiFonta symbol set

Font Management
ESC (s3T Select Courier font
ESC (s0T Select Line Printer font
ESC (s1T Select Pica font
ESC (s2T Select Elite font
ESC (s4T Select Helvetica font
ESC (s5T Select Times Roman (TMS RMN) font
ESC (s6T Select Gothic font
ESC (s7T Select Script font
ESC (s8T Select Prestige font
ESC *c#D Specify font ID '#'
ESC *c#E Specify character code '#'
ESC *c0F Delete all fonts, including permanent
ESC *c1F Delete all temporary fonts
ESC *c2F Delete last font ID specified
ESC *c3F Delete last character code and font ID specified
ESC *c4F Make last font ID temporary
ESC *c5F Make last font ID permanent
ESC *c6F Copy or assign last font ID specified
ESC *c7F Reestablish ROM
ESC *c8F Set primary font
ESC *c9F Set secondary font
ESC *c10F Set primary and secondary font default
ESC )s#W <data> Create font header
ESC (s#W <data> Download character
ESC (#X <data> Designate downloaded font as primary
ESC )#X <data> Designate downloaded font as secondary
ESC (#@ Primary font default (see printer manual)
ESC )#@ Secondary font default(see printer manual)

Pitch and Point Selection
ESC (s10H Set 10 pitch
ESC (s12H Set 12 pitch
ESC (s16.6H Set 16.66 pitch

ESC (s7V Set point size to 7
ESC (s8V Set point size to 8
ESC (s8.5V Set point size to 8.5
ESC (s10V Set point size to 10
ESC (s12V Set point size to 12
ESC (s14.4V Set point size to 14.4

Page Dimensions
ESC &l#P Set page length to '#' lines
ESC &l#E Set top margin to '#' lines
ESC &l#F Set text length to '#' lines
ESC 9 Clear margins
ESC &a#L Set left margin to column '#'
ESC &a#M Set right margin to column '#'
ESC &l#C Set vertical motion index to '#' 1/48" increments
ESC &l#D Set lines per inch to '#', valid values are:
1, 2, 3, 4, 6, 8, 12, 16 or 24
ESC &k#H Set horizontal motion index where # is derived
using # = (120.0 / cpi) (1/10 precision)

Cursor Positioning
ESC &a#R Move to row '#'
ESC &a#C Move to col '#'
ESC &a#H Move to horizontal position '#' in decipoints
ESC &a#V Move to vertical position '#' in decipoints
ESC *p#X Move to horizontal position '#' in dots
ESC *p#Y Move to vertical position '#' in dots
ESC &f0S Push cursor position
ESC &f1 Pop cursor position

Raster Graphics
ESC *t75R Select 75 dots per inch graphics mode
ESC *t100R Select 100 dots per inch graphics mode
ESC *t150R Select 150 dots per inch graphics mode
ESC *t300R Select 300 dots per inch graphics mode
ESC *r0A Start graphics at left most position
ESC *r1A Start graphics at current cursor
ESC *b#W <data> Transfer '#' byte raster image as stream "<data>"
ESC *rB End graphics

Advanced Graphics
ESC *c#A Set horizontal rule/pattern size in dots
ESC *c#H Set horizontal rule/pattern size in decipoints
ESC *c#B Set vertical rule/pattern size in dots
ESC *c#V Set vertical rule/pattern size in decipoints
ESC *c0P Select black rule
ESC *c2P Select gray scale pattern
ESC *c3P Select HP-Defined pattern
ESC *c#G Set grey scale pattern, where # is a value between
[0..6] for HP defined patterns and [0..100] to
specify percentage gray scaling. The mode depends
on the rule/pattern selected using ESC *c?P
ESC *c1G Vertical lines pattern
ESC *c2G Horizontal lines pattern
ESC *c3G Diagonal lines pattern (upward left to right)
ESC *c4G Diagonal lines pattern (downward left to right)
ESC *c5G Horizontal/vertical grid lines pattern
ESC *c6G Diagonal grid pattern
ESC *c#G Set gray scaling to '#' percent

Macro commands
ESC &f#Y Identify macro as ID "#'
ESC &f0X Start macro definition
ESC &f1X Stop macro definition
ESC &f2X Execute macro
ESC &f3X Call macro
ESC &f4X Enable auto macro overlay
ESC &f5X Disable auto macro overlay
ESC &f6X Delete all macros
ESC &f7X Delete all temporary macros
ESC &f8X Delete macro ID
ESC &f9X Make macro temporary
ESC &f10X Make macro permanent

Miscellaneous
ESC (s#B Set stroke weight '#'=(7..-7), 7=bold, -7=light
ESC &dD Set underline on
ESC &d@ Set underline off
ESC = Half line feed
ESC Y Turn display functions mode on
ESC Z Turn display functions mode off (default)
ESC &p#X <data> Disable command interpretation for the '#' bytes
following this command
ESC &l0L Disable perforation skip
ESC &l1L Enable perforation skip
ESC &k0G Set line terminators to CR=CR, LF=LF, FF=FF
ESC &k1G Set line terminators to CR=CR+LF, LF=LF, FF=FF
ESC &k2G Set line terminators to CR=CR, LF=CR+LF, FF=CR+FF
ESC &k3G Set line terminators to CR=CR+LF, LF=CR+LF, FF=CR+FF
ESC &s0C Enable end of line wrap
ESC &s1C Disable end of line wrap


Escape sequence combination rules:

1. The first 2 characters following the ESC must be the same.
2. The final character in any sequence other than the last must be
changed to lower case.
3. The last character in the complete sequence must be changed to
upper case.
4. Escape sequences must be specified in the order in which they
should be performed.


- the space following ESC is not included in the string