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

A5 Landscape two column 1

Status
Not open for further replies.

plog

Programmer
May 13, 2003
4
GB
Hi,

I can configure my printer setup under windows to print files in two (A5) columns on landscape A4 paper.

Is it possible to do the same thing using PCL commands?

I have an application that recieves a text stream via a serial connection from an old legacy system and passes it on to a network printer.

I would like to be able to embed the necessary PCL commands into the text stream to enable the legacy system to print parts of the document in this format and other parts in normal portrait A4 single column mode.

Any help greatly appreciated.

Chris
 
There isn't a "magic" PCL command as such to produce two column output, but you can make it work by embedding PCL commands into the text. Of course there is no text justification etc. You will have to keep track of the line count.

Turn off perf skip.

1. Set page offset for left side page. Print the appropriate number of lines for the page format.

2. Set page offset for right side page. Move cursor to top line. Print the appropriate number of lines for the page format. Issue FormFeed.

3. Goto step 1

I would preprocess the raw text and create a print file with the PCL code embedded. Then you can just print that file as normal text.



Jim Asman
jlasman@telus.net
 
Jim,

Thanks for the pointer. I will confess to not being very familiar with PCL - this is my first endeavour!

Is there any chance you could supply an example?

Brgrds,
Chris
 
What is it exactly you are trying to do?

Do you want to print 2 A5 pages on a landscape A4 sheet?

If so, do you intend to print on both sides; i.e., to make a booklet?


Jim Asman
jlasman@telus.net
 
Not exactly. The legacy system is spewing out an ascii text report that used to get printed in a standard fixed font on (orignally) a dot matrix line printer and more recently a laser printer directly connected to it.

The report is huge and does require someone to actually sit down and read through it.

The request was, in order to reduce the amount of paper being produced, to format the report using a smaller, proportional font, print in landscape mode in two columns.

The report users do not want it printed on both sides (phew) but they do want the second column to continue from where the first column ended and the first column of the second page to continue from where the last column of the previous page left off etc. (Not repeating any lines of course!)

Ideally they'd like a nice line border around the two A5 pages, but I'll worry about that one later!

Thats about as clear as I can make it without the use of diagrams!

Hope that helps.

Chris
 
The drill would go something like the.

<esc>E<esc>&l26a1o8d3e60F #Reset,landscape 60 lines @ 8lpi
<esc>&l0L #Disable Perf Skip
<esc>&l0Z #Sheet offset to Leftmost position

60 lines of text in here #Page 1

<esc>&l-4109Z<esc>&a0R #Shift Offset 1/2 page to right
#Goto top Row

60 lines of text in here #Page 2

<esc>&l0Z^L #Set offset back to left, formfeed

60 lines of text in here #Page 3

<esc>&l-4109Z<esc>&a0R

60 more lines of text #Page 4

<esc>&l0Z^L

The PCL code is shown on separate lines, but in the real situation they would be tagged on to the end of the last line of the page.

Your actual numbers for the offsets would be different if you included a border. I would set up the borders as an automatic overlay.

This assumes that there aren't any FF's embedded in the text. If there are, then you will have to deal with it.

What platform are you running this operation on?

Get a PCL manual and dissect the codes shown above.

Jim Asman
jlasman@telus.net
 
Thanks Jim.

I'll have a go and see how it goes....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top