I can't use the "WritePrinter" to print Chinese

  • Thread starter Thread starter franchdream
  • Start date Start date
F

franchdream

IntPtr pBytes;
Int32 dwCount;
dwCount = szString.Length;
pBytes = Marshal.StringToCoTaskMemAnsi(szString);
string yang = Marshal.PtrToStringAnsi(pBytes);
........
WritePrinter(hPrinter, pBytes, dwCount, ref dwWritten);

I want to know why I can't print Chinese used this method. I can only print
the ASCII of these Chinese.
Thanks!
 
Try to let the printer driver to handle the Chinese character for you. Use
those reporting tools like Crystal or Reporting Services.

chanmm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top