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!

Java Print Services &SequenceInputStream

Status
Not open for further replies.

PatHill

Programmer
Oct 26, 2000
8
0
0
GB
Hi,

Because Java Print Services is not complete, I need to send control characters to a printer prior to the printable data itself to effect Landscape printing.

As a Doc can be declared to use an INPUT_STREAM, one way of doing this, appears to be to use SequenceInputStream with the first stream as a ByteArrayInputStream (populated with byte array of PCL control characters) and the second stream being a FileInputStream pointing the file I want to print.

If I do this, and read through the SequenceInputStream it works exactly as you would expect with the control characters being followed by the file data.

However, if I try to print the document, a curious thing happens. What it appears to do is to split the document into print jobs that are the same length as the control array, but only prints characters from the file of data (!)

Anyone got any ideas ?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top