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

Printing 2 ways on one sheet

Status
Not open for further replies.

longhair

MIS
Feb 7, 2001
889
0
0
US
Hi All...
I am trying to print some data 2x's to a page. First upside down, then right side up (so when the sheet is folded in half both will appear right side up).
Am generating the file from Progress on an HPUX box.
The following is partial code, any ideas??

x1 = chr(27) + "(0Y" + chr(27) + "(s0p4.6h12v0s0b0T". /*barcode font*/
x2 = "*" + somedata + "*".
x3 = x2.
x4 = x2.
x5 = chr(27) + "(3@". /*default font*/
x6 = chr(27) + "E". /*reset prntr*/
x7 = chr(27) + "(0U" + chr(27) + "(s1p48v0s3b4101T". /*cg times font*/
x8 = chr(10) + chr(13). /*crlf*/
x9 = caps(trim(someotherdata)).
x10 = chr(27) + "&a180P". /*rotate to 180*/
x11 = chr(27) + "&a0P". /*rotate to 0*/
x12 = chr(27) + "*p600X". /*columns*/
x13 = chr(27) + "*p600Y". /*rows*/
x14 = chr(27) + "*p-600X".
x15 = chr(27) + "*p-600Y".
display x12 skip (0) with no-labels.
display x13 skip (0)with no-labels.
display x10 skip (0) with no-labels.
display x1 skip (0) with no-labels.
display x2 skip (0) with no-labels.
display x3 skip (0) with no-labels.
display x4 skip (0) with no-labels.
display x5 skip (0) with no-labels.
display x8 skip (0) with no-labels.
display x8 skip (0) with no-labels.
display x7 skip (0) with no-labels.
display x9 skip (0) with no-labels.
display x5 skip (0) with no-labels.
/*display x6 skip (0) with no-labels.*/
display x11 skip (0) with no-labels.
display x8 skip (0) with no-labels.
display x8 skip (0) with no-labels.
display x8 skip (0) with no-labels.
/*display x14 skip (0) with no-labels.
display x15 skip (0) with no-labels.*/
/*display x1 skip (0) with no-labels.*/
display x2 skip (0) with no-labels.
display x3 skip (0) with no-labels.
display x4 skip (0) with no-labels.
display x5 skip (0) with no-labels.
display x8 skip (0) with no-labels.
display x8 skip (0) with no-labels.
display x7 skip (0) with no-labels.
display x9 skip (0) with no-labels.
display x6 skip (0) with no-labels.
output close.
end.
end.
Seems I can get the first "somedata" & "someotherdata" to print upside down, but cannot get the second "somedata" & "someotherdata" to print at all.

TIA
Longhair
 
If it isn't printing at all, maybe it is getting rotated off the page.

For a sanity check, can you print to a file and verify that the missing print is actually being sent to the printer.

You can email that file to me and I will have a look. Jim Asman
jlasman@telus.net
 
I don't know Progress, so I assume that
'display xyz skip (0) with no-labels'
implies
'output xyz without adding anything'.

On this basis, a cursory examination of your code snippet suggests that the problem is that at the point you switch from 180-degree text rotation to 0-degree rotation ('display x11') this is followed by several LineFeed-CarriageReturn pairs (shouldn't these be the other way round, by the way), and then the 'display x15' sequence.

This sequence moves the cursor vertically upwards by 600 PCL units (of whatever dimension they have been set to elsewhere by the 'Esc&u#D' (Unit-of-Measure) sequence, or an assumed default), RELATIVE to the current cursor position.

I think you need to use an ABSOLUTE, rather than RELATIVE, positioning sequence at this point: try taking out the '-' character and see what happens, then adjust the value as required.

Another point: it can be very confusing, using both PCL cursor positioning sequences, and 'CrLf' sequences (the effect of which will depend on the current Vertical Motion Index setting), to provide vertical positioning.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top