×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Can't find when a page is ejected PCL5

Can't find when a page is ejected PCL5

Can't find when a page is ejected PCL5

(OP)
Hi,

In most cases the page is ejected when the cursor moves beyond the printable area, am I right?
I have a .prn file with PCL5 and the cursor moves to halfway the page, then HPGL is used to move the cursus further down, but not beyond the printable area...

How do I know when the paga is ejected?

RE: Can't find when a page is ejected PCL5

The page is ejected when the printer receives a ctrl-L (page-feed, X0C) Also, if there are any data on the page, when it receives a reset (esc E), the page orientation is changed (esc &lnO) or, as you suggested, when the cursor moves below the last printable line on the page.

RE: Can't find when a page is ejected PCL5

>> ... In most cases the page is ejected when the cursor moves beyond the printable area, am I right? ...

Not as such.

If the print stream contains absolute cursor positioning sequences (such as <Esc>*p#X and <esc>*p#Y), then data following such sequences which place the cursor outside of the printable area will just not be visible - but it won't cause a page eject.

If however, your data consists just (or mainly) of LineFeed-terminated text lines (without each of these lines being preceded by cursor positioning sequences), then I think that once the lines reach the bottom margin, the printer will automatically eject the page and start a new one.


>> ... I have a .prn file with PCL5 and the cursor moves to halfway the page, then HPGL is used to move the cursus
>> further down, but not beyond the printable area...
>> How do I know when the paga is ejected?

Not really sure what you are asking here; you need to provide a sample print stream to illustrate what you mean.


... and bear in mind that a number of PCL sequences will cause an implicit page eject in certain situations; for example, the 'set orientation' sequence (<esc>&l#O) will cause a page eject on most (all?) LaserJet printers, if the current page has a different orientation, and there are already text or raster objects within the printable area of the page.

RE: Can't find when a page is ejected PCL5

(OP)
http://www17.zippyshare.com/v/26581354/file.html

this is the print stream. There should be 4 pages. Hope you can help me find when the pages are ejected.

RE: Can't find when a page is ejected PCL5

What is it you are trying to do or why?

I only find 3 page ejects in the file.

The software is simply using a formfeed (^L or 0x0C) to cause the page to eject. I will just call it FF, a formfeed.

Logically, if you found those characters you would have it. Unfortunately there are countless FF characters included in binary data in the file, false positives as it were. Your search needs to avoid these.

When it is time for a page to be ejected, we may be in HP-GL/2 mode or in PCL mode. If in HP-GL it the software jumps back to PCL and then issues the FF. You have a sequence ^[%1A^L

There are two of those in the file. The other possibility of course is that you are already in PCL mode. In this case, almost certainly the character that follows the ^L will be an escape ^[ or 0x1B. That final point is also true when we have just come from HP-GL. So if we do a search for...

^L^[ or 0x0C 0x1B we should have it covered.

It's certainly not bulletproof but a place to start.

Jim Asman
http://www.spectracolorservices.com

RE: Can't find when a page is ejected PCL5

As Jim says:

- There are only three real form feed control code characters (hexadecimal 0c) in the file.

- but there are 474 instances of this byte value in total (471 of them are within PCL or HP-GL/2 binary sequences).

See attached analysis of your print file.

RE: Can't find when a page is ejected PCL5

... but other print streams may use methods other than FormFeed control code characters to start a new page or side.

RE: Can't find when a page is ejected PCL5

(OP)
Thanks for the help. I didn't think of the form feed control codes. It works now.

@jlasman: I'm making a PCL Viewer like PageTech, RedTitan, SwiftView. With more possibilities.

RE: Can't find when a page is ejected PCL5

So what would your 'viewer' make of the attached print file, which prints three duplex (A4) sheets, with variable data and a form overlay on the front faces, and a 'boilerplate' form on the rear faces - but doesn't use any FormFeed characters.

RE: Can't find when a page is ejected PCL5

... and this is a (brief) analysis of the contents of that print file:

CODE

<Esc>%-12345X Universal Exit Language (UEL) @PJL Enter Language = PCL[0d][0a] <Esc>E Printer Reset <Esc>&u600D Unit-of-Measure (600 PCL units per inch) <Esc>&f1025y Macro Control ID (identifer = 1025) 0X Macro Control: Start Macro Definition ... macro contents not shown ... <Esc>&f1X Macro Control: Stop Macro Definition <Esc>&f32766y Macro Control ID (identifer = 32766) 0X Macro Control: Start Macro Definition ... macro contents not shown ... <Esc>&f1X Macro Control: Stop Macro Definition <Esc>&l26a Page Size: A4 0o Orientation: Portrait 1s Simplex/Duplex: Duplex Long-Edge Bind 1l Perforation Skip: Enable 0E Top Margin (0 lines) <Esc>&a0L Left Margin (column 0) <Esc>&f1025y Macro Control ID (identifer = 1025) 3X Macro Control: Call Macro <Esc>(19U Primary Font: Symbol Set (identifier = 19U) <Esc>(s0p Primary Font: Spacing: Fixed 6h Primary Font: Pitch (6 characters per inch) 0s Primary Font: Style (Upright, solid) 3b Primary Font: Stroke Weight: Bold 4099T Primary Font: Typeface (identifier = 4099) <Esc>*p2258x Cursor Position Horizontal (2258 PCL units) 1350Y Cursor Position Vertical (1350 PCL units) ... data ... 1 of 3 <Esc>(19U Primary Font: Symbol Set (identifier = 19U) <Esc>(s0p Primary Font: Spacing: Fixed 12h Primary Font: Pitch (12 characters per inch) 0s Primary Font: Style (Upright, solid) 0b Primary Font: Stroke Weight: Medium 4099T Primary Font: Typeface (identifier = 4099) <Esc>*p458x Cursor Position Horizontal (458 PCL units) 1500Y Cursor Position Vertical (1500 PCL units) ... data ... PaperSize: <Esc>*p458x Cursor Position Horizontal (458 PCL units) 1650Y Cursor Position Vertical (1650 PCL units) ... data ... PaperType: <Esc>*p458x Cursor Position Horizontal (458 PCL units) 1800Y Cursor Position Vertical (1800 PCL units) ... data ... Plex Mode: <Esc>*p458x Cursor Position Horizontal (458 PCL units) 1950Y Cursor Position Vertical (1950 PCL units) ... data ... Method: <Esc>*p458x Cursor Position Horizontal (458 PCL units) 2100Y Cursor Position Vertical (2100 PCL units) ... data ... Orientation: <Esc>*p458x Cursor Position Horizontal (458 PCL units) 2250Y Cursor Position Vertical (2250 PCL units) ... data ... Rear Orientation: <Esc>*p458x Cursor Position Horizontal (458 PCL units) 2400Y Cursor Position Vertical (2400 PCL units) ... data ... Main Form: <Esc>*p458x Cursor Position Horizontal (458 PCL units) 2550Y Cursor Position Vertical (2550 PCL units) ... data ... Rear Boilerplate: <Esc>(19U Primary Font: Symbol Set (identifier = 19U) <Esc>(s0p Primary Font: Spacing: Fixed 12h Primary Font: Pitch (12 characters per inch) 0s Primary Font: Style (Upright, solid) 3b Primary Font: Stroke Weight: Bold 4099T Primary Font: Typeface (identifier = 4099) <Esc>*p1658x Cursor Position Horizontal (1658 PCL units) 1500Y Cursor Position Vertical (1500 PCL units) ... data ... A4 <Esc>*p1658x Cursor Position Horizontal (1658 PCL units) 1650Y Cursor Position Vertical (1650 PCL units) ... data ... <not set> <Esc>*p1658x Cursor Position Horizontal (1658 PCL units) 1800Y Cursor Position Vertical (1800 PCL units) ... data ... Duplex Long-edge binding <Esc>*p1658x Cursor Position Horizontal (1658 PCL units) 1950Y Cursor Position Vertical (1950 PCL units) ... data ... CallBegin <Esc>*p1658x Cursor Position Horizontal (1658 PCL units) 2100Y Cursor Position Vertical (2100 PCL units) ... data ... Portrait <Esc>*p1658x Cursor Position Horizontal (1658 PCL units) 2250Y Cursor Position Vertical (2250 PCL units) ... data ... <not set> <Esc>*p1658x Cursor Position Horizontal (1658 PCL units) 2400Y Cursor Position Vertical (2400 PCL units) ... data ... D:\PCLTestData\TestForms\PCL5\Id1025_PortRuled.ovl <Esc>*p1658x Cursor Position Horizontal (1658 PCL units) 2550Y Cursor Position Vertical (2550 PCL units) ... data ... D:\PCLTestData\TestForms\PCL5\PortFramex2.ovl <Esc>&a2G Duplex Page Side Selection: Back Side <Esc>&f32766y Macro Control ID (identifer = 32766) 3X Macro Control: Call Macro <Esc>&a1G Duplex Page Side Selection: Front Side <Esc>&f1025y Macro Control ID (identifer = 1025) 3X Macro Control: Call Macro <Esc>(19U Primary Font: Symbol Set (identifier = 19U) <Esc>(s0p Primary Font: Spacing: Fixed 6h Primary Font: Pitch (6 characters per inch) 0s Primary Font: Style (Upright, solid) 3b Primary Font: Stroke Weight: Bold 4099T Primary Font: Typeface (identifier = 4099) <Esc>*p2258x Cursor Position Horizontal (2258 PCL units) 1350Y Cursor Position Vertical (1350 PCL units) ... data ... 2 of 3 <Esc>&a2G Duplex Page Side Selection: Back Side <Esc>&f32766y Macro Control ID (identifer = 32766) 3X Macro Control: Call Macro <Esc>&a1G Duplex Page Side Selection: Front Side <Esc>&f1025y Macro Control ID (identifer = 1025) 3X Macro Control: Call Macro <Esc>(19U Primary Font: Symbol Set (identifier = 19U) <Esc>(s0p Primary Font: Spacing: Fixed 6h Primary Font: Pitch (6 characters per inch) 0s Primary Font: Style (Upright, solid) 3b Primary Font: Stroke Weight: Bold 4099T Primary Font: Typeface (identifier = 4099) <Esc>*p2258x Cursor Position Horizontal (2258 PCL units) 1350Y Cursor Position Vertical (1350 PCL units) ... data ... 3 of 3 <Esc>&a2G Duplex Page Side Selection: Back Side <Esc>&f32766y Macro Control ID (identifer = 32766) 3X Macro Control: Call Macro <Esc>&f1025y Macro Control ID (identifer = 1025) 8X Macro Control: Delete Macro <Esc>&f32766y Macro Control ID (identifer = 32766) 8X Macro Control: Delete Macro <Esc>E Printer Reset <Esc>%-12345X Universal Exit Language (UEL)

RE: Can't find when a page is ejected PCL5

(OP)
It doesn't support macro's yet

RE: Can't find when a page is ejected PCL5

... and here's the analysis:

CODE

<Esc>%-12345X Universal Exit Language (UEL) @PJL Enter Language = PCL[0d][0a] <Esc>E Printer Reset <Esc>&u600D Unit-of-Measure (600 PCL units per inch) <Esc>&l26a Page Size: A4 0o Orientation: Portrait 1s Simplex/Duplex: Duplex Long-Edge Bind 1l Perforation Skip: Enable 0E Top Margin (0 lines) <Esc>&a0L Left Margin (column 0) <Esc>(19U Primary Font: Symbol Set (identifier = 19U) <Esc>(s0p Primary Font: Spacing: Fixed 6h Primary Font: Pitch (6 characters per inch) 0s Primary Font: Style (Upright, solid) 3b Primary Font: Stroke Weight: Bold 4099T Primary Font: Typeface (identifier = 4099) <Esc>*p2258x Cursor Position Horizontal (2258 PCL units) 1350Y Cursor Position Vertical (1350 PCL units) ... data ... 1 of 3 <Esc>(19U Primary Font: Symbol Set (identifier = 19U) <Esc>(s0p Primary Font: Spacing: Fixed 12h Primary Font: Pitch (12 characters per inch) 0s Primary Font: Style (Upright, solid) 0b Primary Font: Stroke Weight: Medium 4099T Primary Font: Typeface (identifier = 4099) <Esc>*p458x Cursor Position Horizontal (458 PCL units) 1500Y Cursor Position Vertical (1500 PCL units) ... data ... PaperSize: <Esc>*p458x Cursor Position Horizontal (458 PCL units) 1650Y Cursor Position Vertical (1650 PCL units) ... data ... PaperType: <Esc>*p458x Cursor Position Horizontal (458 PCL units) 1800Y Cursor Position Vertical (1800 PCL units) ... data ... Plex Mode: <Esc>*p458x Cursor Position Horizontal (458 PCL units) 1950Y Cursor Position Vertical (1950 PCL units) ... data ... Method: <Esc>*p458x Cursor Position Horizontal (458 PCL units) 2100Y Cursor Position Vertical (2100 PCL units) ... data ... Orientation: <Esc>*p458x Cursor Position Horizontal (458 PCL units) 2250Y Cursor Position Vertical (2250 PCL units) ... data ... Rear Orientation: <Esc>*p458x Cursor Position Horizontal (458 PCL units) 2400Y Cursor Position Vertical (2400 PCL units) ... data ... Main Form: <Esc>*p458x Cursor Position Horizontal (458 PCL units) 2550Y Cursor Position Vertical (2550 PCL units) ... data ... Rear Boilerplate: <Esc>(19U Primary Font: Symbol Set (identifier = 19U) <Esc>(s0p Primary Font: Spacing: Fixed 12h Primary Font: Pitch (12 characters per inch) 0s Primary Font: Style (Upright, solid) 3b Primary Font: Stroke Weight: Bold 4099T Primary Font: Typeface (identifier = 4099) <Esc>*p1658x Cursor Position Horizontal (1658 PCL units) 1500Y Cursor Position Vertical (1500 PCL units) ... data ... A4 <Esc>*p1658x Cursor Position Horizontal (1658 PCL units) 1650Y Cursor Position Vertical (1650 PCL units) ... data ... <not set> <Esc>*p1658x Cursor Position Horizontal (1658 PCL units) 1800Y Cursor Position Vertical (1800 PCL units) ... data ... Duplex Long-edge binding <Esc>*p1658x Cursor Position Horizontal (1658 PCL units) 1950Y Cursor Position Vertical (1950 PCL units) ... data ... CallBegin <Esc>*p1658x Cursor Position Horizontal (1658 PCL units) 2100Y Cursor Position Vertical (2100 PCL units) ... data ... Portrait <Esc>*p1658x Cursor Position Horizontal (1658 PCL units) 2250Y Cursor Position Vertical (2250 PCL units) ... data ... <not set> <Esc>*p1658x Cursor Position Horizontal (1658 PCL units) 2400Y Cursor Position Vertical (2400 PCL units) <Esc>*p1658x Cursor Position Horizontal (1658 PCL units) 2550Y Cursor Position Vertical (2550 PCL units) <Esc>&a2G Duplex Page Side Selection: Back Side <Esc>*p600x Cursor Position Horizontal (600 PCL units) 600Y Cursor Position Vertical (600 PCL units) ... data ... rear face <Esc>&a1G Duplex Page Side Selection: Front Side <Esc>(19U Primary Font: Symbol Set (identifier = 19U) <Esc>(s0p Primary Font: Spacing: Fixed 6h Primary Font: Pitch (6 characters per inch) 0s Primary Font: Style (Upright, solid) 3b Primary Font: Stroke Weight: Bold 4099T Primary Font: Typeface (identifier = 4099) <Esc>*p2258x Cursor Position Horizontal (2258 PCL units) 1350Y Cursor Position Vertical (1350 PCL units) ... data ... 2 of 3 <Esc>&a2G Duplex Page Side Selection: Back Side <Esc>*p600x Cursor Position Horizontal (600 PCL units) 600Y Cursor Position Vertical (600 PCL units) ... data ... rear face <Esc>&a1G Duplex Page Side Selection: Front Side <Esc>(19U Primary Font: Symbol Set (identifier = 19U) <Esc>(s0p Primary Font: Spacing: Fixed 6h Primary Font: Pitch (6 characters per inch) 0s Primary Font: Style (Upright, solid) 3b Primary Font: Stroke Weight: Bold 4099T Primary Font: Typeface (identifier = 4099) <Esc>*p2258x Cursor Position Horizontal (2258 PCL units) 1350Y Cursor Position Vertical (1350 PCL units) ... data ... 3 of 3 <Esc>&a2G Duplex Page Side Selection: Back Side <Esc>*p600x Cursor Position Horizontal (600 PCL units) 600Y Cursor Position Vertical (600 PCL units) ... data ... rear face <Esc>E Printer Reset <Esc>%-12345X Universal Exit Language (UEL)

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close