Printing from Java to local printer fails

Hans Artmann mail at arcasys.de
Thu Nov 12 01:25:50 PST 2009


Michael,
unfortunately I don't have the sources of the print API so all I can do is to look into the print service and print job structures after they've been created and after the print call.

What am I looking for?

There's an irregularity when printing on Linux which does not occur when printing from Windows:
I'm catching the PrintJob events and on Windows I get printDataTransferCompleted and printJobNoMoreEvents in sequence while on Linux this sequence always appears twice, i.e.
printDataTransferCompleted
printJobNoMoreEvents
printDataTransferCompleted
printJobNoMoreEvents

Any idea?
Thanks  Hans

>
> On Nov 10, 2009, at 3:49 PM, Hans Artmann wrote:
> > Michael, thanks for your answer, but unfortunately it didn't help
> > (and yes, I restarted cupsd).
> > Which debug information would be useful?
>
> You'll need to run the Java VM in a debugger so you can see what is
> going wrong on the Java end of things.
>
> >
> > Hans
> >
> >> Sun's IPP implementation does not conform to the spec, and they
> >> error =
> >> out when they see a "noValue" value for orientation-requested-
> >> default. =
> >> Do:
> >>
> >>    lpadmin -p printer -o orientation-requested-default=3D3
> >>
> >> to set a default (portrait) until Sun fixes their IPP implementation.
> >>
> >> On Nov 9, 2009, at 10:31 AM, Hans Artmann wrote:
> >>
> >>> PrintServiceLookup finds all printers. Jobs directed to a printer
> >>> on a =
> >> remote machine are created and printed properly.
> >>> Jobs directed to a local printer don't even create a job entry in
> >>> CUPS =
> >> and they don't print.
> >>> There is no exception thrown.
> >>> There are messages created in /var/log/cups/error_log on debug
> >>> level =
> >> but no visible errors.
> >>> I tried with JRE1.6_03 and 1.6_12 and 1.6_17. and CUPS Versions: =
> >> 1.2.7, 1.3.8, 1.4.x
> >>> =20
> >>>> =46rom what I can see in the Java debugger I think it must have =
> >> something to do with Java sending to ipp://localhost:631
> >>> which is obviously not processed by cups while any other target
> >>> works =
> >> fine.
> >>> A test page can be printed locally and e.g. lp -d printer file
> >>> also =
> >> works.
> >>> =20
> >>> Any advice would be very much appreciated.
> >>> I've posted the same problem to the Sun Java Forum in parallel.
> >>> =20
> >>> Hans
> >>> =20
> >>> _______________________________________________
> >>> cups mailing list
> >>> cups at easysw.com
> >>> http://lists.easysw.com/mailman/listinfo/cups
> >>
> >> ___________________________________________________
> >> Michael Sweet, Senior Printing System Engineer
> >>
> >>
> >>
> >
> > _______________________________________________
> > cups mailing list
> > cups at easysw.com
> > http://lists.easysw.com/mailman/listinfo/cups
>
> ___________________________________________________
> Michael Sweet, Senior Printing System Engineer
>
>
>





More information about the cups mailing list