Printer Dialog Problem
Iï¿½m having some problems with the printer dialog,
i need to get the printerï¿½s sharing name from the
printer dialog to print to a FileOutputStream, but idonï¿½t know how to get the property. I hope someone can help me out. here is my peace of code.
StringBuffer yourText = new StringBuffer();
yourText.append(?TEXTO ? TEXTO - TEXTO?);
byte bytes = yourText.toString().getBytes();
PrinterJob pjob = PrinterJob.getPrinterJob();
FileOutputStream outputStream = new FileOutputStream("\\\\Server\\epson");
-->> pjob.getPrintService().getName() ->> this method will get the printerï¿½s name, but i need the printerï¿½s sharing name, and i canï¿½t find it, iï¿½ve tryed to use the PrinterJob to print the text, but itï¿½s printing in graphical mode, and i need to print pure text to the printer, if there is another way to do so, please help me.
Thanks in advance.