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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

2/Page

Status
Not open for further replies.

henningp

Technical User
May 2, 2012
15
US
We are wanting to print 2/page. Is there a PCL command for that?
Thanks!
 
No there is not. Your application will have to deal with it.

Is your intent to print two pages side by side, perhaps duplexed, and then folded into a booklet? If so, then the specific pages that print side by side will be dependent on the total number of pages in the booklet.

For example, a single sheet 4 page booklet would have ...

Side A p4 p1

Side B p3 p2

Lets say you wanted a 16 page booklet(4 sheets).

Fold the stack of paper in half and work your way through all 16 booklet pages, writing the appropriate page number on each page. Then you can take it all apart to see the arrangement required for each sheet.




Jim Asman
 
>> Is there a PCL command for that?
>>> No there is not. Your application will have to deal with it.
>>> ... see the arrangement required for each sheet ...

As Jim says, you need to do it yourself (assuming, as per your other threads, that your application is writing the PCL directly, and not using a printer driver).

To put (a few) more bones on it, you'd have to select an appropriate size of font, and either use precise cursor positioning sequences to place each page and line (as per attached sample print file), or (assuming two logical pages on a Portrait sheet) set appropriate left margin and line spacing and initial cursor position (for each page) then just have <CR><LF>-terminated lines of text.
 
 http://www.mediafire.com/download.php?61y6ihfyy6f91bf
... and here's an analysis of that sample print file:

Code:
<Esc>E            Printer Reset
<Esc>&l26a        Page Size: A4
       0O         Orientation: Portrait
<Esc>&u600D       Unit-of-Measure (600 PCL units per inch)
<Esc>&a0L         Left Margin (column 0)
<Esc>&l0E         Top Margin (0 lines)
<Esc>(19U         Primary Font: Symbol Set (identifier = 19U)
<Esc>(s0p         Primary Font: Spacing: Fixed
       15h        Primary Font: Pitch (15 characters per inch)
       0s         Primary Font: Style (Upright, solid)
       0b         Primary Font: Stroke Weight: Medium
       4099T      Primary Font: Typeface (identifier = 4099)
<Esc>*p218x       Cursor Position Horizontal (218 PCL units)
       360Y       Cursor Position Vertical   (360 PCL units)
<Esc>*c4230a      Rectangle Size Horizontal (4230 PCL units)
       4b         Rectangle Size Vertical   (4 PCL units)
       0P         Fill Rectangular Area: Solid Area
<Esc>*c4a         Rectangle Size Horizontal (4 PCL units)
       3115b      Rectangle Size Vertical   (3115 PCL units)
       0P         Fill Rectangular Area: Solid Area
<Esc>*p218x       Cursor Position Horizontal (218 PCL units)
       3475Y      Cursor Position Vertical   (3475 PCL units)
<Esc>*c4234a      Rectangle Size Horizontal (4234 PCL units)
       4b         Rectangle Size Vertical   (4 PCL units)
       0P         Fill Rectangular Area: Solid Area
<Esc>*p4448x      Cursor Position Horizontal (4448 PCL units)
       360Y       Cursor Position Vertical   (360 PCL units)
<Esc>*c4a         Rectangle Size Horizontal (4 PCL units)
       3115b      Rectangle Size Vertical   (3115 PCL units)
       0P         Fill Rectangular Area: Solid Area
<Esc>*p218x       Cursor Position Horizontal (218 PCL units)
       3525Y      Cursor Position Vertical   (3525 PCL units)
<Esc>*c4230a      Rectangle Size Horizontal (4230 PCL units)
       4b         Rectangle Size Vertical   (4 PCL units)
       0P         Fill Rectangular Area: Solid Area
<Esc>*c4a         Rectangle Size Horizontal (4 PCL units)
       3115b      Rectangle Size Vertical   (3115 PCL units)
       0P         Fill Rectangular Area: Solid Area
<Esc>*p218x       Cursor Position Horizontal (218 PCL units)
       6640Y      Cursor Position Vertical   (6640 PCL units)
<Esc>*c4234a      Rectangle Size Horizontal (4234 PCL units)
       4b         Rectangle Size Vertical   (4 PCL units)
       0P         Fill Rectangular Area: Solid Area
<Esc>*p4448x      Cursor Position Horizontal (4448 PCL units)
       3525Y      Cursor Position Vertical   (3525 PCL units)
<Esc>*c4a         Rectangle Size Horizontal (4 PCL units)
       3115b      Rectangle Size Vertical   (3115 PCL units)
       0P         Fill Rectangular Area: Solid Area
<Esc>*p482x       Cursor Position Horizontal (482 PCL units)
       6700Y      Cursor Position Vertical   (6700 PCL units)
<Esc>*p230x       Cursor Position Horizontal (230 PCL units)
       450Y       Cursor Position Vertical   (450 PCL units)
 ..data..         Page 01 line 01
<Esc>*p230x       Cursor Position Horizontal (230 PCL units)
       585Y       Cursor Position Vertical   (585 PCL units)
 ..data..                 line 02
<Esc>*p230x       Cursor Position Horizontal (230 PCL units)
       720Y       Cursor Position Vertical   (720 PCL units)
 ..data..                 line 03
<Esc>*p230x       Cursor Position Horizontal (230 PCL units)
       855Y       Cursor Position Vertical   (855 PCL units)
 ..data..                 etc. etc.
<Esc>*p230x       Cursor Position Horizontal (230 PCL units)
       3615Y      Cursor Position Vertical   (3615 PCL units)
 ..data..         Page 02 line 01
<Esc>*p230x       Cursor Position Horizontal (230 PCL units)
       3750Y      Cursor Position Vertical   (3750 PCL units)
 ..data..                 line 02
<Esc>*p230x       Cursor Position Horizontal (230 PCL units)
       3885Y      Cursor Position Vertical   (3885 PCL units)
 ..data..                 line 03
<Esc>*p230x       Cursor Position Horizontal (230 PCL units)
       4020Y      Cursor Position Vertical   (4020 PCL units)
 ..data..                 etc. etc.

... and it should have had a 'reset' (<Esc>E) at the end - I forgot to add it in.
 
I have a few COBOL applications which do just that: Print booklets, computing the pages that should be side-by-side and producing the appropriate PCL mixed with the data.

As COBOL is supposedly an anyone-can-read-it language, you should not have any problem converting it to the language of your application.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top