• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to distinguish Hardware printer and Software printer

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hello,
My Destop application use javax.print.* to detech printer. However, what i get are all the printers that are in Control Panel/Printers and Faxes folder. How can i distinguish hardware printers( real printer) and software printers(got from installing software:Snagit 9, ... ) to remove software printers from printer lists?
My code:

Can i select correct printers from function: PrintServiceLookup.lookupPrintServices with correct conditions?
Thank you.
Minhbt.
 
Minh Bui
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I thinks i can distinguish hardware printer and software printer(cutePDF, Snagit ..) by their attributes. For example, software printer do not connect to computer through LPT, COM, or USB port, but hardware is reverse. But i still did not find the instance of this in java.
Here is what i got now, I m not sure this work for all hardware printer.

Any ideas?
Minhbt.

[Edit Insert line breaks in "code". Such long lines go off the edge of the screen and are difficult to read.[/edit]
 
Marshal
Posts: 79239
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Too difficult a question for "beginning Java". Moving thread.
 
Minh Bui
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I think the key point here is: How to get port name of printer?
Virtual printers do not connect computer through COM, LPT or USB port.
Any idea?
Minhbt.
 
reply
    Bookmark Topic Watch Topic
  • New Topic