dcsimg
problem in printing Chinese character on printer
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Deep_Dj
Posted On:   Tuesday, April 28, 2009 01:43 AM

Hi, When i am using below code to print chinese character, its printing some garbage value. Please suggest how to print chinese character using printer. currently its giving junk values for chinese chars. public void printOutput (ArrayList outContent) { try { String PrinterPort = "LPT1:"; // can use com1,com2 etc PrintWriter bufWr = new PrintWriter(PrinterPort, "UTF-8"); for (int i=0;i { if (outContent.get(i)!=null ) { bufWr.write(outContent.get(i) + ""); bufWr.write(" "); } } bufWr.flush(); bufWr.close(); System.out.println("print   More>>

Hi,

When i am using below code to print chinese character, its printing some garbage value.
Please suggest how to print chinese character using printer. currently its giving junk values for chinese chars.



public void printOutput (ArrayList outContent)
{

try
{
String PrinterPort = "LPT1:"; // can use com1,com2 etc
PrintWriter bufWr = new PrintWriter(PrinterPort, "UTF-8");
for (int i=0;i
{
if (outContent.get(i)!=null )
{
bufWr.write(outContent.get(i) + "");
bufWr.write("
");
}
}

bufWr.flush();
bufWr.close();
System.out.println("print out completed");
}
catch (Exception e) {
}

}



Regards
Dj.

   <<Less
About | Sitemap | Contact