A
Aoife Kavanagh
I'm working with the JDK 1.4.1_03-b02 on XP. I'm writing an
application that needs to dynamically retrieve data, format it and
sent it to a HP laser printer. I started off using the javax.print
service but I'm finding that i'm limited in what I can actually do.
It appears that the only DocFlavors supported by these printers are
print images, application/octet mime types and the awt interface
Printable and Pageable representation types.
As I am only printing text I chose the application/octet, InputStream
combination but this appears not to allow the OrientationRequested
attribute - I need to print landscape, not portrait. Has anybody got
around this?
I also need to have some formatting of the text such as bold text,
larger font size in some places etc. Does anybody know of any way of
specifying control charactors in the InputStream that will allow this?
Do any of the URL DocFlavors actually interpret the contents of a html
file and print text as it would be displayed? I think the answer is
no, but just sanity checking?
It looks to me as if I'm going to have to place my formatted text in
to a swing or awt component and print from there. This seems like
overkill to me - am I missing something?
Any help appreciated,
Regards,
Aoife
application that needs to dynamically retrieve data, format it and
sent it to a HP laser printer. I started off using the javax.print
service but I'm finding that i'm limited in what I can actually do.
It appears that the only DocFlavors supported by these printers are
print images, application/octet mime types and the awt interface
Printable and Pageable representation types.
As I am only printing text I chose the application/octet, InputStream
combination but this appears not to allow the OrientationRequested
attribute - I need to print landscape, not portrait. Has anybody got
around this?
I also need to have some formatting of the text such as bold text,
larger font size in some places etc. Does anybody know of any way of
specifying control charactors in the InputStream that will allow this?
Do any of the URL DocFlavors actually interpret the contents of a html
file and print text as it would be displayed? I think the answer is
no, but just sanity checking?
It looks to me as if I'm going to have to place my formatted text in
to a swing or awt component and print from there. This seems like
overkill to me - am I missing something?
Any help appreciated,
Regards,
Aoife