• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Printing to Wireless printer.

 
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm using javax.print package to print a text document. I can get the default printer (I can print the name of the printer). But when I create the DocPrintJob object and call it's .print() function,
nothing happens .

The only difference between this printer and the one I test on at the office is that the one at the office is a network printer (non-wireless) and the one at my house is wireless.
Is there something different I have to do to get it to print to a wireless printer? No exception is throw so I don't know how to debug it to see what the problem is.

Thanks,

Justin
 
Justin Fox
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I added a PrintJobListener to the job, only the 'DataTransferCompleted' and 'NoMoreEvents' events are raised.

Justin
 
Justin Fox
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
here is my code:


Justin
 
Justin Fox
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And the PrintJobListener class code:

 
Justin Fox
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm starting to think Java's ability to print to HP printers is limited if not non-existent.

I have a wireless laserjet at home that won't print and I have a LasterJet 1000 series at work that won't print as well.

No more HP printers for me!

Justin
 
Justin Fox
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok... I got the bright idea maybe I should look at the print queue to see if it's even getting that far, and it is.
I looked at the document properties and it says 0 bytes. I tried some different flavors, but none work besides AUTOSENSE.

The print job starts and then just deletes itself, but I'm sure that's because it's 0 bytes...

anyone know a way to deal with this problem?

Justin
 
His brain is the size of a cherry pit! About the size of this ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic