×
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

Printing Character on Each Page

Printing Character on Each Page

Printing Character on Each Page

(OP)
Hello,

I am very new to PCL and am trying to use it to compensate for a flaw in a software application.  The report prints from the application onto a preprinted form and must align correctly.  I am using an HP LaserJet 8150DN Printer (Generic/Text Driver).

For the Begin Print Job printer command I am using the following codes:

<1B>E<1B>&k0S<1B>&l0E<1B>&l6D<1B>&l66F<1B>&l8C<1B>&l5H<1B>&k12.04H

These codes works to align the text from the application on a pre-printed form.  What I need to do is to place the character "9" on each page that prints.  It needs to be located on the 54th line and to the left of the logical page defined in the Begin Print Job commands.

I have had luck using these codes as the End Print Job print command; however, this places the character "9" only on the last page that prints.

<1B>&a0R<1B>&l-59U<1B>&a54R9

How do I get the character 9 to print on each page, on the 54th row 59 "units" to the left of everything else?

Thank you for your help!

RE: Printing Character on Each Page

The only way to do this in PCL that I know of is to embed the following code at the end of each page:

<1B>&a0R<1B>&l-59U<1B>&a54R9<1B>&a0R<1B>&lU

You also might note that <1B>&l6D and <1B>&l8C mean exactly the same thing and are there for redundant.

RE: Printing Character on Each Page

Another way would be to include <1B>&a0R<1B>&l-59U in the begin print job sequence, shift all data one column right, and print a "9" in column 1 of line 54.

RE: Printing Character on Each Page

(OP)
Thank you for your help!  With regard to your second post, I am limited to using PCL codes to accomplish any changes in alignment and add the character "9".  Are you familiar with "overlay macros"?  Would this be a solution?

RE: Printing Character on Each Page

An overlay should be perfect for what you are after.

An overlay macro lives in it own environment, so you should be able to have the left offset you need in the overlay, but not in your regular print. Lets call it macro 101.

<1b>&f101y0X<1b>&l-59U<1b>&a54R9<1b>&f1X<1b>&f101y10X

That should be all you need. Then in your regular print you need to put <1b>&f101y4X somewhere to enable the macro as an automatic overlay.

The beauty of the overlay is that you don't have to deal with the CAP after you have printed the 9. You may have to change those parameters to suit.

Jim Asman
http://www.spectracolorservices.com

RE: Printing Character on Each Page

(OP)
Thank you so much!  You are a life saver!

As I mentioned, I am very new to this.  Where to I put the macro code?

<1b>&f101y0X<1b>&l-59U<1b>&a54R9<1b>&f1X<1b>&f101y10X

Does this go in a text file on the print server.  The name of my print server is \\ps01.  If so, how do I get it there and what do I name the file

Can I put the code to call the macro in the Begin Print Job printer command along with the other codes that set-up the logical page.  For example...

<1B>E<1B>&k0S<1B>&l0E<1B>&l6D<1B>&l66F<1B>&l8C<1B>&l5H<1B>&k12.04H<1b>&f101y4X

RE: Printing Character on Each Page

The code for the macro only needs to be sent to the printer once at the beginning of the job. It can ptetty well go anywhere and typically would be sent as part of the init.

Experiment a little bit. If your format stuff is only sent once, I would put it BEFORE the <1b>E. In fact, I would add another reset...

<1b>E MACRO STUFF <1b>E YOUR EXISTING INIT ...

Jim Asman
http://www.spectracolorservices.com

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