[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 341
  • Last Modified:

printers

list of escape codes for laser print
0
lapettina
Asked:
lapettina
1 Solution
 
mark2150Commented:
Most all of the laser printers obey the hp LaserJet II command set. If you use these commands 99% of the lasers in the world will work.

There are a *LOT* of laser commands in the PCL command set. Are there any SPECIFIC codes you want?

I have a complete set of codes for everything from simple line drawing and text positioning to bitmapped graphics and font downloading. It is *MUCH TOO MUCH* to post here.

Contact me at mark_lambert@ntsc.navy.mil for more details
0
 
lapettinaAuthor Commented:
la impresora es una HP LASERJET 4L
y necesito definirle tamaño de hoja, tamaños de caracteres, y otros codigos de escape.
Si ponen una version en español para las preguntas y respuestas seria maravilloso!!!

0
 
mark2150Commented:
Mi palabra espanol poquito. Cinco anos en Miami.

De programma es in mi officina. (my spanish just ran out...) I'll send it to you monday.

Adios!

M
0
A Cyber Security RX to Protect Your Organization

Join us on December 13th for a webinar to learn how medical providers can defend against malware with a cyber security "Rx" that supports a healthy technology adoption plan for every healthcare organization.

 
ewilsonCommented:
HP is usually very good about providing the PCL command set with all of their printers if you do not have the books that came with the printer then check thier website maybe you can download or order it.
0
 
mark2150Commented:
;
; These are the standard laser control strings
;
;                  Reset     10 CPI       6 LPI        Portrait
P_RESET      DB      ESK, "E", ESK, "&k0S", ESK, "&l6D", esk, "&l0O", ZERO
;
;                          300 DPI     Begin raster
PREAMBLE      DB      ESK, "*t300R", ESK, "*r1A", ZERO
;
P_RESET1      DB      ESK, "E", zero
;
            EVEN
;                  'n' bytes follow
PCX_SETUP      DB      ESK, "*r1A"            ;Start at current cursor
            DB      ESK, "*t300R", zero      ;300 DPI
;
PCX_HD            DB      ESK, "*b"            ;Begin graphics row
PCX_LEN      DB      "0000W", zero
;
PCX_TAIL      DB      ESK, "*rB", ESK, "&f1S", zero      ;End of graphics & restore
;
;                  'n' bytes follow
X1_HD            DB      ESK, "*b32W"
X1_BODY      DB      32 DUP (ZERO)
X1_LEN            EQU      $ - X1_HD
;
PCX_BODY      DB      32 DUP (ZERO)      ;Here we store our line of GFX
;
X4_HD            DB      ESK, "*b128W"
X4_BODY      DB      128 DUP (ZERO)
X4_LEN            EQU      $ - X4_HD
;
X8_HD            DB      ESK, "*b256W"
X8_BODY      DB      256 DUP (ZERO)
X8_LEN            EQU      $ - X8_HD
;
;                  Raster ends
POSTAMBLE      DB      ESK, "*rB", ZERO
;
; These are the LaserJet command strings
;
BAR            DB      ESK, "*c4a150B"            ;Bar is .015w x .5h
            DB      ESK, "*c0P", zero      ;Lase command
;
NO_BAR            DB      ESK, "*p+4x+0Y", zero      ;Move right .015
;
PTR_PUSH      DB      ESK, "&f0S", zero      ;Save current cursor
;
PTR_POP      DB      ESK, "&f1S", zero      ;Restore cursor
;
MOVE_TO_RC      DB      ESK, "*p"            ;Move to specified row & col
SET_COL      DB      "0000x"                  ;Col dot could be 2556
SET_ROW      DB      "0000Y", zero            ;Row dot could be 3300
;
SET_PORT      DB      ESK, "&l0O", zero
SET_LAND      DB      ESK, "&l1O", zero
;
; move.delta.xy$ = esk, "*p+", x$, "x+", y$, "Y"
;
REL_MOVE      DB      ESK, "*p-"
REL_MOVEX      DB      "0000X", ZERO
            .XLIST
;
; Templates for laser command
;
; esk, "*p", x$, "x", y$, "Y", esk, "*c3a3b100g0P"
; set.gray$ = esk, "*c", g$, "G"
; move.xy$ = esk, "*p", STR$(ABS(h.inches * dots - 1)), "x", STR$(ABS(v.inches * dots - 1)), "Y"
; move.delta.xy$ = esk, "*p+", x$, "x+", y$, "Y"
; move.col.row$ = esk, "&a", col$, "c", row$, "R"
; draw.bar$ = esk, "*c", x$, "a", y$, "B"
; hack$ = push.pos$, move.delta.xy$(0, -half.line), draw.bar$(margin / 2, .001), prt.bar$, pop.pos$
; reset$ = esk, "E"
; push.pos$ = esk, "&f0S"
; pop.pos$ = esk, "&f1S"
; prt.bar$ = esk, "*c0P"
; prt.gray$ = esk, "*c2P"
; prt.pat$ = esk, "*c3P"
;
            .XLIST
;
SPACE_DOWN      DB      esk, "*p+"            ;Position Relative
SPACING      DB      "0050Y", ZERO            ;6 LPI - match to VE "ONE_ROW"
;
FORM_XY      DB      esk, "*p+"            ;Position Relative
FORM_X            DB      "0000x+"
FORM_Y            DB      "0000Y", ZERO
;
FORM_ABS_XY      DB      ESK, "*p"            ;Position Absolute
FORM_ABS_X      DB      "0000x"
FORM_ABS_Y      DB      "0000Y", ZERO
;
FORM_WH      DB      ESK, "&f0S"            ;Save current
            DB      ESK, "*c"            ;Begin line
FORM_LINE_W      DB      "0000a"                  ;Width
FORM_LINE_H      DB      "0000b"                  ;Height
LASE_GRAY      DB      "100g"                  ;Gray Intensity
AS_A_RULE      DB      "0P"                  ;Rule/gray switch
            DB      ESK, "&f1S", ZERO      ;Restore
;
SET_COPY_HEAD      DB      ESK, "&l"            ;Set copy count
SET_COPIES      DB      "01X", zero
;
FONT_HEAD      DB      ESK, "*c"            ;Start font load
FONT_NUM      DB      "0000D", ZERO            ;Insert font number here
                                    ;and copy font file to printer
;
PICK_FONT      DB      ESK, "("            ;Select primary Font
FONT_NUMBER      DB      "0000X", ZERO            ;Insert number here
;
NORMAL_FONT      DB      ESK, "&k2S"            ;16.6 CPI
            DB      ESK, "&l8D"            ;8 LPI
            DB      ESK, "(11U"            ;IBM PC character set
            DB      ESK, "(s0t8.5v0P"      ;Line printer, 8.5pt, fixed
            DB      ZERO
;
COURIER_FONT      DB      ESK, "&k0S"            ;10 CPI
;            DB      ESK, "&l6D"            ;6 LPI - Allow override on spacing
            DB      ESK, "(10U"            ;IBM PC character set
            DB      ESK, "(s3t0p0B"            ;Courier, fixed, normal
;            DB      ESK, "(s3t12v0p0B"      ;Courier, 12 pt, fixed, normal
            DB      ZERO
;
; Ok, flowchart for drawing a box is as follows:
;
; Save
; Line Wide, Thick            L1
; Line Thick, High            L2
; Move (Wide - Thick), 0      M1
; Line Thick, High            L3
; Restore
; Save
; Move 0, (High - Thick)      M2
; Line Wide, Thick            L4
; Restore
;
BOXER            DB      ESK, "&f0S"            ;Save current
;
; Line #1
;
            DB      ESK, "*c"            ;Begin line
L1W            DB      "0000a"                  ;Width
L1H            DB      "0000b"                  ;Height
            DB      "100g"                  ;Gray Intensity
            DB      "0P"                  ;Rule/gray switch
;
; Line #2
;
            DB      ESK, "*c"            ;Begin line
L2W            DB      "0000a"                  ;Width
L2H            DB      "0000b"                  ;Height
            DB      "100g"                  ;Gray Intensity
            DB      "0P"                  ;Rule/gray switch
;
; Move #1
;
            DB      esk, "*p+"            ;Position Relative
M1X            DB      "0000X"
;
; Line #3
;
            DB      ESK, "*c"            ;Begin line
L3W            DB      "0000a"                  ;Width
L3H            DB      "0000b"                  ;Height
            DB      "100g"                  ;Gray Intensity
            DB      "0P"                  ;Rule/gray switch
;
            DB      ESK, "&f1S"            ;Restore
            DB      ESK, "&f0S"            ;Save current
;
; Move #2
;
            DB      esk, "*p+"            ;Position Relative
M2Y            DB      "0000Y"
;
; Line #4
;
            DB      ESK, "*c"            ;Begin line
L4W            DB      "0000a"                  ;Width
L4H            DB      "0000b"                  ;Height
            DB      "100g"                  ;Gray Intensity
            DB      "0P"                  ;Rule/gray switch
;
            DB      ESK, "&f1S"            ;Restore
            DB      ZERO                  ;End
;

0
 
mark2150Commented:
I know this is a little hard to read, but 95% of the operations that you'ld want to do with a laser are defined here. The ESK is an ASCII ESC (1BH/27D). The codes here work when sent to the laser. What else are you looking for?

M

0
 
jamestthomasCommented:
HP LaserJet 4L Printer - PCL Typeface List with Escape Sequences





Internal SCALEABLE Typefaces and Bit mapped Fonts


TYPEFACE
 PITCH / POINT
 ESCAPE SEQUENCE
 
Courier
 Scale
 <esc>(___<esc>(s0p *** h0s0b4099T
 
CG Times
 Scale
 <esc>(___<esc>(s1p - - - v0s0b4101T
 
CG Times Bold
 Scale
 <esc>(___<esc>(s1p - - - v0s3b4101T
 
CG Times Italic
 Scale
 <esc>(___<esc>(s1p - - - v1s0b4101T
 
CG Times Bold
     
Italic
 Scale
 <esc>(___<esc>(s1p - - - v1s3b4101T
 
Coronet
 Scale
 <esc>(___<esc>(s1p - - - v1s0b4116T
 
Univers Medium
 Scale
 <esc>(___<esc>(s1p - - - v0s0b4148T
 
Univers Bold
 Scale
 <esc>(___<esc>(s1p - - - v0s3b4148T
 
Univers Medium
     
Italic
 Scale
 <esc>(___<esc>(s1p - - - v1s0b4148T
 
Univers Bold
     
Italic
 Scale
 <esc>(___<esc>(s1p - - - v1s3b4148T
 
Univers Medium
     
Condensed
 Scale
 <esc>(___<esc>(s1p - - - v4s0b4148T
 
Univers Bold
     
Condensed
 Scale
 <esc>(___<esc>(s1p - - - v4s3b4148T
 
Univers Medium
     
Condensed Italic
 Scale
 <esc>(___<esc>(s1p - - - v5s0b4148T
 
Univers Bold
     
Condensed Italic
 Scale
 <esc>(___<esc>(s1p - - - v5s3b4148T
 
Antique Olive
 Scale
 <esc>(___<esc>(s1p - - - v0s0b4168T
 
Antique Olive
     
Bold
 Scale
 <esc>(___<esc>(s1p - - - v0s3b4168T
 
Antique Olive
     
Italic
 Scale
 <esc>(___<esc>(s1p - - - v1s0b4168T
 
Albertus Medium
 Scale
 <esc>(___<esc>(s1p - - - v0s1b4362T
 
Albertus
     
Extra Bold
 Scale
 <esc>(___<esc>(s1p - - - v0s4b4362T
 
Wingdings
 Scale
 <esc>(579L<esc>(s1p - - -v0s0b6826T
 
Courier Bold
 Scale
 <esc>(___<esc>(s0p *** h0s3b4099T
 
Courier Italic
 Scale
 <esc>(___<esc>(s0p *** h1s0b4099T
 
Courier
     
Bold Italic
 Scale
 <esc>(___<esc>(s0p *** h1s3b4099T
 
Letter Gothic
 Scale
 <esc>(___<esc>(s0p *** h0s0b4102T
 
Letter Gothic
     
Bold
 Scale
 <esc>(___<esc>(s0p *** h0s3b4102T
 
Letter Gothic
     
Italic
 Scale
 <esc>(___<esc>(s0p *** h1s0b4102T
 



*** Pitch: .10 - 576 Symbol set



- - - Point size: .25 - 999.75



 

 
 
 

 

0

Featured Post

New Tabletop Appliances Blow Competitors Away!

WatchGuard’s new T15, T35 and T55 tabletop UTMs provide the highest-performing security inspection in their class, allowing users at small offices, home offices and distributed enterprises to experience blazing-fast Internet speeds without sacrificing enterprise-grade security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now