javax.print questions - how useful is it??

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top