Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting the Network Fax Machine names ina Domain...

Status
Not open for further replies.

fixthebug2003

Programmer
Oct 20, 2003
294
US
Hi,
Is thre a way we can write a programme to get a list of Fax and Printers in a Domain in a Network..so the user can pick up the Printer/Fax to Print/Fax?

Fixthebug2003
 
Can you Elaborate a little more on that...what do you mean by that?
 
I mean that I don't think there's an standard cross-platform way to find faxes or network printers, that will depend on the OS level.

Cheers,

Dian
 
Well I'm not sure about faxes, but you can certainly look up available printers via the javax.print API.

Eg, this line looks up what your default printer is :

PrintService service = PrintServiceLookup.lookupDefaultPrintService();


You should have a look at this example :


--------------------------------------------------
Free Database Connection Pooling Software
 
Well..if one can find the Printers then obviously we can find any hardware in the network..as long as the API's are there. Thats my understanding (Correct me if I am wrong).
Thanks.

 
Of course - but only if the Java APIs exist to do it. For example, while there may be a javax.print API to locate printers & do printing stuff, there is not a javax.fax package. So to do it, you will need to write your own - possibly using a native solution (ie C/C++) and then use JNI to plug that native code into your Java. In effect creating your own "fax API". Probably, you will need to use the javax.comm API to communicate with a fax machine over a serial port also, or again, write a native method.

Remember that the way the javax.print API accesses what printers exist (on Win32 in any case) is via native code anyhow, embedded in Sun's proprietry JRE code.

--------------------------------------------------
Free Database Connection Pooling Software
 
Arghh, today is not my day.

Let me clarify my post, I think it leads to misunderstanding.

What I tried to say is I don't think there's an unique API to access the Windows concept of Fax/Printer as it appear on Control Panel that can be ported to another OS.

There are APIs even to send faxes, but they rely on platform dependent implementacions of Java APIs. In fact there's a java.fax package, but it's not standard.

Cheers.

Dian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top