Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > java.awt.print and javax.print, difference

Reply
Thread Tools

java.awt.print and javax.print, difference

 
 
hiwa
Guest
Posts: n/a
 
      03-09-2005
My past experience in Java printing is quite thin.
If I were to design and implement a general purpose desktop printing
utility application, which is better to be taken on between
java.awt.print package and javax.print package?

In view of performance, resource(memory, time, ...) cost, functional
versatility and ease of programming and debugging, what are the
essential difference between the two?

Greatly appreciate valuable opinions and remarks from Java printing
gurus. Thanks in advance.
 
Reply With Quote
 
 
 
 
Thomas Weidenfeller
Guest
Posts: n/a
 
      03-09-2005
hiwa wrote:
> My past experience in Java printing is quite thin.


You are a lucky guy.

> If I were to design and implement a general purpose desktop printing
> utility application, which is better to be taken on between
> java.awt.print package and javax.print package?


Both suck. javax.print sucks a little bit less. Not because the API
makes more sense, but because you get better access to the printer's
features and supported document formats (DocFlavors) - if your VM
implementation cooperates nicely with your OS.

In reality you might have a need for both packets. E.g.
java.awt.print.PrinterJob.pageDialog(...) now has a version which takes
a javax.print.PrintRequestAttributeSet for initialization. You could of
course role your own dialog instead.

> In view of performance, resource(memory, time, ...) cost, functional
> versatility and ease of programming and debugging, what are the
> essential difference between the two?


Both suck. java.awt.print is extremely limited. So I don't think the
driving force will be anything like resources, but getting it to work at
all in a reasonable way.

Regarding debugging: Instead of using a real printer in the beginning
configure everything for printing PostScript to a file, and get a
PostScript viewer like ghostview for ghostscript. You will not only save
a few dead trees, but also save some time.

/Thomas

--
The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/...g/java/gui/faq
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What are the similarity and difference b/w EBJ and COM+? =?iso-8859-1?B?bW9vcJk=?= Java 1 05-30-2006 12:12 PM
Difference between bin and obj directories and difference between project references and dll references jakk ASP .Net 4 03-22-2005 09:23 PM
EnableSessionState=readonly and difference between InProc and StateServer mode Jeffry van de Vuurst ASP .Net 0 05-18-2004 10:18 AM
2 Pics Scanned @ width 1024 pixels, and DPI 72 and 300. What Is the Photographic Quality Difference? Ubiquitous Digital Photography 8 12-24-2003 05:02 PM
Exact difference between 'const char *' and 'char *', also diff between 'const' and 'static' Santa C Programming 1 07-17-2003 02:10 PM



Advertisments