PCL - detecting page breaks

  • Thread starter Thread starter Inzaghi
  • Start date Start date
I

Inzaghi

Hi guys,
I am trying to insert text at the bottom of every page..
My app. does not explicitly specify page breaks..so I have no way of
inserting the page footer at the exact place.
How would I do this without having to keep track of line numbers.....

Is there any way to know when the page break occurs so that I could
insert a page footer right before it...

Appreciate ur help ..

Thanks
Inzaghi
 
Inzaghi said:
Hi guys,
I am trying to insert text at the bottom of every page..
My app. does not explicitly specify page breaks..so I have no way of
inserting the page footer at the exact place.
How would I do this without having to keep track of line numbers.....

Is there any way to know when the page break occurs so that I could
insert a page footer right before it...

Maybe it's as easy as looking for a formfeed:

s/\f/This is my footer\f/g

You'd also have to include some positioning commands to put the footer
at the bottom of the page instead of at the last line of data.

But it may not be that easy. PCL may have some horrendous escape
sequence to eject a page that's used instead. Your print job may not
use any page eject commands until the end, counting on the printer to
eject a page when it's full. The print job could be a bitmap.
 
You can do this by supplying an "overlay" macro.

Information on this can be found in the PCL Technical Reference Manual
chapter "Macros"
 
|Is there any way to know when the page break occurs so that I could
|insert a page footer right before it...

Page break in PCL can occur in (at least) 3 different ways: Form feed
character (0x0C), an escape sequence (0x1B 0x26 0x6c 0x30 0x48), or
when the number of lines printed exceed the defined lines-per-page.
Lines of PCL code do not always equal printed lines - PCL can use
exact cursor positioning.
 
Please note that there are several conditional page breaks, like changing
the orientation, paper source....
 
Seems like my first post got lost:


You can do this by supplying an "overlay" macro.

Information on this can be found in the PCL Technical Reference Manual
chapter "Macros"
 
Back
Top