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!

How to print a String to printer?

Status
Not open for further replies.

haux

Programmer
Apr 11, 2001
79
DZ
How to print a String to printer?

Hello

I just want to print in my printer (Epson 9 pins Black/White) little text.
But all the doc i have tell me how to print the graphic interface using that :
*********************************************************
PrinterJob printJob = PrinterJob.getPrinterJob();
printJob.setPrintable(myPrintPainterObject);

try{
printJob.print();
}catch(Exception PrintException){}
**********************************************************
Since the 'myPrintPainterObject' is a Printable interface, i can't make:
printJob.setPrintable("myStringHere");

Can some one help me?
Thanks for all;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top