• 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
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Identifying Type of Printer Using Java

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Friends

Currently i am Using javax.print Package to Print TXT Files
Its Working Fine.

But Whats my Query is

Is There any Possibility to Identify the Type of Printer's im using,for example is the Printer is Laser or dot-matrix or inkjet?

I Tried search engine to find any other possiblity,i didnt get any solution.

Any help will be greatly Appreciated and its Needed Urgently

Thanks in advance

Regards
Vasu
 
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Vasu,

Java won't provide you that flexibility at h/w level. If you want to detect the printer driver type then you need to use native code to access the APIs.

Check with Java COM bridges.

 
vasu devan
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Pradeep,

Thanks for the response
Do you have any link for getting info through native methods?

Regards
vasu
 
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jacob
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Call JNI to call C program.

Please check it out:
http://as.wiley.com/WileyCDA/WileyAncillary/productCd-076454957X,typeCd-DOWNLOAD.html

See the sample code of JMX programming chapter 13.

It will get the following object (if you use level 4):
PRINTER_INFO_4
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/prntspol_8vle.asp

Hope it may help.
 
Bras cause cancer. And tiny ads:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic