Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

landscape, 2 per page and duplex

Status
Not open for further replies.

henningp

Technical User
May 2, 2012
15
US
we are trying to print a landscape, 2 per page and duplex, but no luck. any help would be really appreciated. We are new at this so we need basic information if it's available.
thanks!
 
You need to provide somewhat more information first; e.g.:

- What Operating System? Windows (which version) or *n*x.

- Is this for output from a standard application (e.g. Word), or a 'bespoke' application.

- Are you using a standard printer driver, or is the application generating its own print stream (data and control sequences)?

- What Page Description Language (PDL) is the output print stream using?
Standard PDLs are PCL5, PCL6 (a.k.a. PCL XL) and PostScript.
 
Like I said, we are very new at this. It's a portrait so at this point, this is all we have: ^[&l0O^[&k4S


I know it's not much, but does it help at all?
 
Your data is a representation of two PCL5 escape sequences.

The ^[ character pairs are the method used by some source applications/operating regimes to represent/generate the (non-graphic) control-code Escape character (the character with decimal code 27, or hexadecimal 1B, or octal 033); the character is often referred to as the <Esc> character.

Your two sequences are interpreted as follows:

Code:
<Esc>&l0O         Orientation: Portrait
<Esc>&k4S         Pitch Mode: Elite (12 cpi)

Note that the 'Pitch Mode' sequence is considered to be obsolete, although it is usually still supported/actioned on modern LaserJet devices (but only for scalable fixed-pitch fonts, which basically limits it to Courier or LetterGothic fonts); the modern equivalent is to use 'font selection' sequences.


As you are obviously using PCL5 escape sequences, this answers one of the questions I posed, but not the others (some of which may or may not be relevant).

To select Landscape Orientation and Duplex (long-edge binding), use the following sequences:

Code:
<Esc>&l1O         Orientation: Landscape
<esc>&l1S         Simplex/Duplex: Duplex Long-Edge Bind

These can be combined into a single sequence:

Code:
<Esc>&l1o         Orientation: Landscape
       1S         Simplex/Duplex: Duplex Long-Edge Bind

because they have the same root, so that the '<Esc>&l' doesn't need to be repeated for the second sequence; only the last part of the combination sequence uses an upper-case 'termination' character, the other parts (in this case only one) use the lower-case 'parameter' character equivalent.


For the 'two-up' part of your requirement, how easy this will be to do depends on just how directly you are generating the print stream.

- If you have complete control, you can set line spacing, font size (part of the set of font selection sequences), then use precise positioning of each line.

- If you are merely supplying 'initialisation sequences' to a primitive spooler/driver system, then appending plain text lines, each terminated by a LineFeed (<LF>) character, then you'd still need to set line spacing and font size and something like 'text lines per page' in the initialisation, and rely on the line spacing to advance each 'line' - but this wouldn't distingush between pages unless the original text file contained FormFeed (<FF> characters at appropriate points.

-
 
so would you recommend that it be set up as follows:
^[&k4S ^[&l1o 1S
 
Using

^[&k4S^[&l1o1S

without spaces (and again assuming that your application translates ^[ into the (hexadecimal 1B) Escape character), should:

(a) Set pitch mode to 12 characters-per-inch - but only if the currently selected font is a fixed-pitch scalable font.

On modern LaserJet printers, this limits you to either Courier or Letter Gothic; and if the current font is one of the (many more) scalable proportionally-spaced fonts resident fonts, it will have no effect.
Better to investigate use of 'font selection sequences'.

(b) Set Orientation to Landscape (and reset margins etc. to their default values).

(c) Set Duplex Mode with Long-Edge binding.


To find out more about PCL5, the following link provides a brief history of the PCL language, and links to the PCL Technical Reference manual, and also to other PCL5 & PJL manuals:


Be aware that some of the manuals (in PDF format) are multi-megabyte downloads.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top