×
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

Duplex printing in PCL 5e and PCL 6

Duplex printing in PCL 5e and PCL 6

Duplex printing in PCL 5e and PCL 6

(OP)
Hi, I am quite experienced in PCL programming though I have come up against a problem which is probably easy to resolve once you know what you're looking for. I have just bought a HP9000 Duplex printer and can print through Windows in duplex, but printing through the ESC codes, I cant get the printer to print duplex.

When I send the command at the start of the code to print my duplex document, do I send a feed$ after each side, after both sides are sent? If I send a feed after page one and page two I get two pages printed, front and back, if I send only one feed after the second page I get both sides on the same page. Is there a command I am missing?

I didn't get a manual with the machine so don't know if I am missing an important ESC code other than ESC&l1S.

E$= esc
lprint e$;"E";e$;"&l1O";        ' reset/portrait
lprint e$;"&l0L";               ' disable perf skip
lprint e$;"&l0E";               ' set top margin to 0
lprint e$;"&l1X";               ' copies
lprint e$;"&l1S";               ' duplex

RE: Duplex printing in PCL 5e and PCL 6

"If I send a feed after page one and page two I get two pages printed, front and back".

Isn't that what you are trying to achieve (i.e. duplex)?

RE: Duplex printing in PCL 5e and PCL 6

(OP)
Sorry, this is not clear, I get page one ejected and then page two ejected, in affect two pages not one page with side 1 and side 2 on one sheet.

I have to feed the sheet through twice using this methed to get a proper duplex page

RE: Duplex printing in PCL 5e and PCL 6

(OP)
What I am after is
I set the mode to duplex
laydown my text for side 1

1. send a page feed
   laydown text for side 2
   send a second page feed

or

2. laydown text for side 2
   send first page feed only

Am I missing a command, as I either get two pages printed with the side 1 on one sheet and side 2 on one sheet or I get one sheet with the text for sides 1 and 2 on the same page.

This is very difficult to explain.

RE: Duplex printing in PCL 5e and PCL 6

To set duplex mode on, use
   <esc>&l1S
where <esc> is the character with decimal code 27 (hexadecimal 0x1b)

You already appear to be setting this.

Thereafter, to print ALL pages in duplex mode, you would have a sequence of:
   sheet 1 front face data
   form-feed (0x0c)
   sheet 1 rear face data
   form-feed (0x0c)
   sheet 2 front face data
   form-feed (0x0c)
   sheet 2 rear face data
   form-feed (0x0c)
   etc.

If you are already doing this, and the data always prints on the front face only, this might imply that your printer does not have a duplex unit, or that the unit is disabled (some printers disable the duplexer if the rear output path is opened).

As an alternative to FormFeed (and to give more control), you could use the 'Duplex Page Side Selection' sequence:
   <esc>&a#G
where:
# = 0 Select next face
# = 1 Select front face
# = 2 Select rear face   

RE: Duplex printing in PCL 5e and PCL 6

Since I'm using SQR to print DUPLEX maybe the correlation here might be the same:
 1.  After setting a variable like DUPLEXon to ON <27>&l1S or....DUPLEXoff to off <27>&l0S using either print or encode statement, I usually put the OFF variable first before the ON variable in the beginning of the program. This way since the program is a cycle, it will turned ON on odd pages and off on even pages.

RE: Duplex printing in PCL 5e and PCL 6

Here's more explanation on why I have to turn OFF the duplexing before turning it ON. Everytime you turn duplexing off that means you are resetting which side the printer is currently on. The printer does not know which side is which(topside or underside). When you turn ON duplexing, it tells the printer that the next page is the underside. If you don't turn this OFF it will continue to be in the underside position.

RE: Duplex printing in PCL 5e and PCL 6

(OP)
Will try these suggestions and see if they work, Duplex page Selection looks interesting. Cheers for the help. Will let you know if I sort the problem with these suggestions.

RE: Duplex printing in PCL 5e and PCL 6

Just a words of caution. When dealing with duplex printing make sure that you know when the printing supposed to go to the next page. This way you will avoid extra pages being spitted out of the printer.

Usually you may just do plain printing and let all printer defaults do it's job. But when you control most of the printer behavior like newline, page size, number of lines, headers and footers, font sizes etc, the whole representaion of the entire text in a page is now different. Conflict will arise specially in controlling new page.

RE: Duplex printing in PCL 5e and PCL 6

(OP)
Thanks. I got it working with the following

<esc>&a#G

# = 0 Select next face
# = 1 Select front face
# = 2 Select rear face   

Send the front side command, then data to print on the front
Send the rear side command, then data to print on the rear
Then form feed and it all works.

Cheers

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