How to set page size in PCL XL

J

John Brown

Sorry to ask such a basic question, but I can't make head nor tail of
the PCL XL manual (http://www.hpdevelopersolutions.com/downloads/64/358/xl_ref20r22.pdf)

I plan to use RedMon (http://www.cs.wisc.edu/~ghost/redmon/index.htm)
to set the page size to a custom 8.25 in X 9.5 in, instead of the
Letter size that is currently sent to the printer. The software (which
prints cheques) does not allow the user to select a paper size. It
appears to override the default custom paper size set in Printing
Preferences (Win2K), although the vendors insist that it doesn't. The
printer (SourceTech ST9335, which is really a Lexmark T632 or T630 on
the inside) complains with "34 Short Paper" after it prints on the
custom paper, but it prints fine when we load Letter-sized paper.

Please see below a hex dump of a PCL XL file that successfully draws a
rectangle around a 8.3 inch X 9.5 inch page. If you copy it and paste
it into Notepad, it should print OK. I can also e-mail the actual PCL
file upon request.

I would be very grateful if you could identify the code sequence that
sets the page size. Th XL manual says that BeginPage = 0x43, and the
paper size (MediaSize or CustomMedia Size) is an attribute of
BeginPage, but there is no occurrence of 0x43 as far as I can see.

/* HEX dump of PCL starts on next line */
00000000 1B25 2D31 3233 3435 5840 504A 4C20 434F 4D4D 454E 5420 474E
4141 4732 .%-12345X@PJL COMMENT GNAAG2
0000001C 4444 2056 6572 7369 6F6E 2038 2E32 2E32 2E30 2066 6F72 2057
696E 646F DD Version 8.2.2.0 for Windo
00000038 7773 2032 3030 300A 4050 4A4C 2043 4F4D 4D45 4E54 2053 6F75
7263 6520 ws 2000.@PJL COMMENT Source
00000054 5465 6368 6E6F 6C6F 6769 6573 2053 542D 3933 3335 0A40 504A
4C20 5345 Technologies ST-9335.@PJL SE
00000070 5420 5041 4745 5052 4F54 4543 5420 3D20 4155 544F 0A40 504A
4C20 5345 T PAGEPROTECT = AUTO.@PJL SE
0000008C 5420 4C49 4D41 4745 454E 4841 4E43 4520 3D20 4F46 460A 4050
4A4C 2053 T LIMAGEENHANCE = OFF.@PJL S
000000A8 4554 204C 434F 4C4C 4154 494F 4E20 3D20 4F46 460A 4050 4A4C
2053 4554 ET LCOLLATION = OFF.@PJL SET
000000C4 204C 4D55 4C54 4950 4147 4550 5249 4E54 203D 204F 4646 0A40
504A 4C20 LMULTIPAGEPRINT = OFF.@PJL
000000E0 5345 5420 4C50 4152 4D20 3A20 5043 4C20 4C46 4F4E 5443 4F4D
5041 5449 SET LPARM : PCL LFONTCOMPATI
000000FC 4249 4C49 5459 203D 2050 434C 350A 4050 4A4C 204C 4A4F 4249
4E46 4F20 BILITY = PCL5.@PJL LJOBINFO
00000118 5553 4552 4944 203D 2022 4164 6D69 6E69 7374 7261 746F 7222
2048 4F53 USERID = "Administrator" HOS
00000134 5449 4420 3D20 2246 494C 4D53 4341 4E31 220A 4050 4A4C 2053
4554 2052 TID = "FILMSCAN1".@PJL SET R
00000150 4553 4F4C 5554 494F 4E20 3D20 3630 300A 4050 4A4C 2053 4554
2054 494D ESOLUTION = 600.@PJL SET TIM
0000016C 454F 5554 3D30 0A40 504A 4C20 454E 5445 5220 4C41 4E47 5541
4745 3D50 EOUT=0.@PJL ENTER LANGUAGE=P
00000188 434C 584C 0A29 2048 502D 5043 4C20 584C 3B31 3B31 3B43 6F6D
6D65 6E74 CLXL.) HP-PCL XL;1;1;Comment
000001A4 204C 6578 6D61 726B 2045 6D75 6C61 7469 6F6E 2C20 4E54 2034
2E30 2044 Lexmark Emulation, NT 4.0 D
000001C0 7269 7665 7200 0AD1 5802 5802 F889 C000 F886 C003 F88F 41C0
00F8 88C0 river...X.X...........A.....
000001DC 01F8 8248 C8C0 174C 6578 6D61 726B 2045 6E68 616E 6365 6420
584C 3D31 ...H...Lexmark Enhanced XL=1
000001F8 2E30 F881 47C0 01F8 28D5 CDCC 0441 0000 1841 F82F C000 F830
C001 F826 .0..G...(....A...A./...0...&
00000214 C000 F834 43C0 01F8 036A C001 F854 7FD3 7800 6400 F82A 75C0
F0F8 2C7B ...4C....j...T..x.d..*u...,{
00000230 C000 F805 79C0 FFF8 0963 E37A 0066 0052 15AA 12F8 42A0 C000
F804 63C0 ....y....c.z.f.R....B.....c.
0000024C 00F8 0979 C102 00F8 4B7A 85D3 5215 6500 F84C 6BC1 0300 F84D
C003 F850 ...y....Kz..R.e..Lk....M...P
00000268 9BFA 0C00 0000 7900 6500 7900 AA12 5215 AA12 8486 C101 00F8
3144 4942 ......y.e.y...R.........1DIB
00000284 1B25 2D31 3233 3435 5840 504A 4C20 4C50 4F52 5452 4F54 4154
450A 1B25 .%-12345X@PJL LPORTROTATE..%
000002A0 2D31 3233 3435 5800 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 -12345X.....................
000002BC 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 ............................
000002D8 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 ............................
000002F4 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 ............................
00000310 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 ............................
0000032C 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 ............................
00000348 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 ............................
00000364 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 ............................
00000380 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 ............................
0000039C 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 ............................
000003B8 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 ............................
000003D4 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 ............................
000003F0 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 ............................
0000040C 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 ............................
00000428 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 ............................
00000444 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 ............................
00000460 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 ............................
0000047C 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 ............................
00000498 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 ............................
000004B4 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 ............................
000004D0 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 ............................
000004EC 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 ............................
00000508 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 ............................
00000524 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 ............................
00000540 0000 0000 0000 0000 0000 0000 0000
..............
/* PCL Hex dump ends */
 
A

Alan

Sorry to ask such a basic question, but I can't make head nor tail of
the PCL XL manual

If you look at the code you posted, the first several lines are PJL
(Printer Job Language), which you should look up first. That controls
many basic printer settings. Then it goes into the PCL.
I think there is a PJL command to ignore page size errors, that may
solve your problem.
(Also PJL is ASCII, just post that, not a hex dump.)
 
J

John Brown

(Also PJL is ASCII, just post that, not a hex dump.)
I realize that. I posted the hex dump of the entire data for
completeness. For what it's worth, the PJL follows:

%-12345X@PJL COMMENT GNAAG2DD Version 8.2.2.0 for Windows 2000
@PJL COMMENT Source Technologies ST-9335
@PJL SET PAGEPROTECT = AUTO
@PJL SET LIMAGEENHANCE = ON
@PJL SET LPARM : PCL LCOLOREXTENSIONS = ON
@PJL SET LCOLLATION = OFF
@PJL SET LMULTIPAGEPRINT = OFF
@PJL SET LPARM : PCL LFONTCOMPATIBILITY = PCL5
@PJL LJOBINFO USERID = "Administrator" HOSTID = "FILMSCAN1"
@PJL SET RESOLUTION = 600
@PJL SET TIMEOUT=0
@PJL ENTER LANGUAGE=PCLXL

My printer manual does not mention PJL at all, and it mentions PCL
only to say that the printer is compatible with it. I could not find
anything specific to my problem , or suppressing errors generally in
the HP PJL reference. The nearest variable that I found was AUTOCONT
which has the following terse description in the manual:

"Returns the autocontinue configuration".

When I set it to ON, it did not help.

I can go to my original plan, but print in PCL instead of PCLXL. The
driver lets you choose. In PCL, I can easily identify and remove the
page size sequence. The default paper size in the front panel is used,
and the job prints OK with no beeping.

Anyway, the printer beeps only at the end of the job, and not after
each page, so plan B would be to do nothing - maybe the customers can
live with the beep.

Thanks for your help.
 
Joined
May 2, 2014
Messages
1
Reaction score
0
For what it's worth (10 years later) the PCL XL page size being selected is a custom size:

Code:
*** Prn Analysis ***:

Date/Time:  2014-05-02 13:03:11
File:       D:\PCLTestData\Sample_hexdump_x01.prn
Size:       679 bytes
Report:     147 rows (excluding header and trailer lines)

Offset         Type                   Sequence          Description
-------------  ---------------------  ----------------  ----------------------------------------------------

0000000000     PCL Parameterised      <Esc>%-12345X     Universal Exit Language (UEL)
               Comment                                  Switch language to PJL
0000000009     PJL Command            @PJL COMMENT       GNAAG2DD Version 8.2.2.0 for Windows 2000[0a]
0000000064     PJL Command            @PJL COMMENT       Source Technologies ST-9335[0a]
0000000105     PJL Command            @PJL SET           PAGEPROTECT = AUTO[0a]
0000000133     PJL Command            @PJL SET           LIMAGEENHANCE = OFF[0a]
0000000162     PJL Command            @PJL SET           LCOLLATION = OFF[0a]
0000000188     PJL Command            @PJL SET           LMULTIPAGEPRINT = OFF[0a]
0000000219     PJL Command            @PJL SET           LPARM : PCL LFONTCOMPATIBILITY = PCL5[0a]
               *** Warning ***                          Following PJL commmand name not recognised:
0000000266     PJL Command            @PJL LJOBINFO      USERID = "Administrator" HOSTID = "FILMSCAN1"[0a]
0000000326     PJL Command            @PJL SET           RESOLUTION = 600[0a]
0000000352     PJL Command            @PJL SET           TIMEOUT=0[0a]
0000000371     PJL Command            @PJL ENTER         LANGUAGE=PCLXL[0a]
               Comment                                  Switch language to PCLXL
0000000397     PCLXL Stream Header    0x292048..        ") HP-PCL XL;1;1;Comment Lexmark Emulation, NT 4."
0000000445                            0x302044..        "0 Driver[00][0a]"
0000000455     PCLXL Data Type        0xd1                  uint16_xy
0000000456                Value       0x58025802            600 600
0000000460     PCLXL Attribute        0xf889              UnitsPerMeasure
0000000462     PCLXL Data Type        0xc0                  ubyte
0000000463                Value       0x00                  eInch
0000000464     PCLXL Attribute        0xf886              Measure
0000000466     PCLXL Data Type        0xc0                  ubyte
0000000467                Value       0x03                  eBackChAndErrPage
0000000468     PCLXL Attribute        0xf88f              ErrorReport
0000000470     PCLXL Operator         0x41              BeginSession
                              No.                       1
0000000471     PCLXL Data Type        0xc0                  ubyte
0000000472                Value       0x00                  eDefaultDataSource
0000000473     PCLXL Attribute        0xf888              SourceType
0000000475     PCLXL Data Type        0xc0                  ubyte
0000000476                Value       0x01                  eBinaryLowByteFirst
0000000477     PCLXL Attribute        0xf882              DataOrg
0000000479     PCLXL Operator         0x48              OpenDataSource
                              No.                       2
0000000480     PCLXL Data Type        0xc8c017              ubyte_array
0000000483                Value       0x4c6578..            "Lexmark Enhanced XL=1.0"
0000000506     PCLXL Attribute        0xf881              CommentData
0000000508     PCLXL Operator         0x47              Comment
                              No.                       3
0000000509     PCLXL Data Type        0xc0                  ubyte
0000000510                Value       0x01                  eLandscapeOrientation
0000000511     PCLXL Attribute        0xf828              Orientation
0000000513     PCLXL Data Type        0xd5                  real32_xy
0000000514                Value       0xcdcc04..            8.300000 9.500000
0000000522     PCLXL Attribute        0xf82f              CustomMediaSize
0000000524     PCLXL Data Type        0xc0                  ubyte
0000000525                Value       0x00                  eInch
0000000526     PCLXL Attribute        0xf830              CustomMediaSizeUnits
0000000528     PCLXL Data Type        0xc0                  ubyte
0000000529                Value       0x01                  eAutoSelect
0000000530     PCLXL Attribute        0xf826              MediaSource
0000000532     PCLXL Data Type        0xc0                  ubyte
0000000533                Value       0x00                  eSimplexFrontSide
0000000534     PCLXL Attribute        0xf834              SimplexPageMode
0000000536     PCLXL Operator         0x43              BeginPage
                              No.                       4
0000000537     PCLXL Data Type        0xc0                  ubyte
0000000538                Value       0x01                  eGray
0000000539     PCLXL Attribute        0xf803              ColorSpace
0000000541     PCLXL Operator         0x6a              SetColorSpace
                              No.                       5
0000000542     PCLXL Data Type        0xc0                  ubyte
0000000543                Value       0x01                  eEvenOdd
0000000544     PCLXL Attribute        0xf854              ClipMode
0000000546     PCLXL Operator         0x7f              SetClipMode
                              No.                       6
0000000547     PCLXL Data Type        0xd3                  sint16_xy
0000000548                Value       0x78006400            120 100
0000000552     PCLXL Attribute        0xf82a              PageOrigin
0000000554     PCLXL Operator         0x75              SetPageOrigin
                              No.                       7
0000000555     PCLXL Data Type        0xc0                  ubyte
0000000556                Value       0xf0                  eROP_P
0000000557     PCLXL Attribute        0xf82c              ROP3
0000000559     PCLXL Operator         0x7b              SetROP
                              No.                       8
0000000560     PCLXL Data Type        0xc0                  ubyte
0000000561                Value       0x00                  0
0000000562     PCLXL Attribute        0xf805              NullPen
0000000564     PCLXL Operator         0x79              SetPenSource
                              No.                       9
0000000565     PCLXL Data Type        0xc0                  ubyte
0000000566                Value       0xff                  255
0000000567     PCLXL Attribute        0xf809              GrayLevel
0000000569     PCLXL Operator         0x63              SetBrushSource
                              No.                       10
0000000570     PCLXL Data Type        0xe3                  sint16_box
0000000571                Value       0x7a0066..            122 102 5458 4778
0000000579     PCLXL Attribute        0xf842              BoundingBox
0000000581     PCLXL Operator         0xa0              Rectangle
                              No.                       11
0000000582     PCLXL Data Type        0xc0                  ubyte
0000000583                Value       0x00                  0
0000000584     PCLXL Attribute        0xf804              NullBrush
0000000586     PCLXL Operator         0x63              SetBrushSource
                              No.                       12
0000000587     PCLXL Data Type        0xc0                  ubyte
0000000588                Value       0x00                  0
0000000589     PCLXL Attribute        0xf809              GrayLevel
0000000591     PCLXL Operator         0x79              SetPenSource
                              No.                       13
0000000592     PCLXL Data Type        0xc1                  uint16
0000000593                Value       0x0200                2
0000000595     PCLXL Attribute        0xf84b              PenWidth
0000000597     PCLXL Operator         0x7a              SetPenWidth
                              No.                       14
0000000598     PCLXL Operator         0x85              NewPath
                              No.                       15
0000000599     PCLXL Data Type        0xd3                  sint16_xy
0000000600                Value       0x52156500            5458 101
0000000604     PCLXL Attribute        0xf84c              Point
0000000606     PCLXL Operator         0x6b              SetCursor
                              No.                       16
0000000607     PCLXL Data Type        0xc1                  uint16
0000000608                Value       0x0300                3
0000000610     PCLXL Attribute        0xf84d              NumberOfPoints
0000000612     PCLXL Data Type        0xc0                  ubyte
0000000613                Value       0x03                  eSint16
0000000614     PCLXL Attribute        0xf850              PointType
0000000616     PCLXL Operator         0x9b              LinePath
                              No.                       17
0000000617     PCLXL Data Type        0xfa                  embedded_data
0000000618     PCLXL Embedded Len.    0x0c000000            12
0000000622                    Data    [ 12 bytes ]          [ 79 00 65 00 79 00 aa 12 52 15 aa 12 ]
0000000634     PCLXL Operator         0x84              CloseSubPath
                              No.                       18
0000000635     PCLXL Operator         0x86              PaintPath
                              No.                       19
0000000636     PCLXL Data Type        0xc1                  uint16
0000000637                Value       0x0100                1
0000000639     PCLXL Attribute        0xf831              PageCopies
0000000641     PCLXL Operator         0x44              EndPage
                              No.                       20
0000000642     PCLXL Operator         0x49              CloseDataSource
                              No.                       21
0000000643     PCLXL Operator         0x42              EndSession
                              No.                       22
               Comment                                  Switch language to PCL
0000000644     PCL Parameterised      <Esc>%-12345X     Universal Exit Language (UEL)
               Comment                                  Switch language to PJL
               *** Warning ***                          Following PJL commmand name not recognised:
0000000653     PJL Command            @PJL LPORTROTATE  [0a]
               Comment                                  Switch language to PCL
0000000670     PCL Parameterised      <Esc>%-12345X     Universal Exit Language (UEL)
               Comment                                  Switch language to PJL

*** End of Report ***
 
Top