• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Javax.print in J2EE 1.3

 
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is javax.print (Java Print Service API ) available in J2EE1.3? (as far as I know, it is not)
But is there any work around to use this in 1.3?

Thanks,
Manoj
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The print service is not part of J2EE (it first appeared in the JDK 1.1). There is a very good reason why the print service would not be part of J2EE - namely it is specifically a technology for a client application.
 
Manoj Gundawar
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Paul,
Thanks for your reply.
But we have a requirement which might need printing to be done from (we think) the server side. Here is the scenario:

We have Java client which allows users to print a document (TIFF format) When we tried this using AWT print, single page TIFF document itself caused several issues:
1.It generated a java print spool of 10MB. (in print spool)
2. Took long time to print 1 page doc. (normally we will have 4-1000 pager tiff docs)
3. For big docs (like 10 pager or so) it caused system to respond slow (hang effect)

Our java client is on JDK1.3. We can not upgrade this to 1.4 (to use javax.print API) just like that,as it affects 100+ business users.
(Also not sure if Javax.print API makes printing faster and efficient)

So we thought about printing this from server (UNIX) as an alterative solution. But J2EE also dosen't support javax.print API.

==================
If anyone has faced this kind of problem and has come up with workable solution, please respond. Also if you can think of some theoritical way to achive this please let me know. (I will try it)
==================

I am open to use JNI, but not sure which language have good support for printing image docs (C++/C/VB?)

Thanks,
Manoj
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The print API treats everything as an image, hence the poor preformance and large print spool. When I tried pretty much the same as you did a year or so ago, I was getting c5MB files for docs a few pages long. If you want the document to appear at a printer available to the client machine you'll get issues too - since specifying networked printers through the API is not very easy.

JNI is possibly your best bet for the client, though I wouldn't be surprised if JNI only gave you access to printers in the same way the Print API does anyway.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic