By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,143 Members | 1,854 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,143 IT Pros & Developers. It's quick & easy.

How to print image and texts to a thermal printer, while sending printer commands?

P: 92
Hi! I'm new to VB.net programming on printing a page to a thermal printer (Epson T88IV). I really had a hard time figuring out how to code the printing of a bitmap image and some text, while sending commands (through font control) to the printer.
I tried sending the escape characters with Control font, but the Graphics.DrawString of PrintPageEventArgs do not allow it.. so I used the RawPrinterHelper class I found on Microsoft KB. It worked out but, I cannot print a bitmap image with it.
Anybody knows how to do that? I will be very grateful and appreciate it if you can show me. Thanks.
Dec 6 '07 #1
Share this Question
Share on Google+
1 Reply


P: 92
Oops, I already figured out the solution a day after I posted this question, and I remember just now to post the it so that if there will be somebody out there who will encounter the same problem then he will know that he can try this solution.

Alright, Epson printers, have "TrueType Font Substitution" provided on their printer settings. You can substitute a device font with a particular TrueType font, on the PrinterPreferences>PrinterSettings of the printer's property dialog. Then you can use that TrueType font in your code. It will be replaced with the device font during run time.

Device font is what you can use to send printer commands. .Net does not support device font anymore, so that was my problem before. With this Font Substitution, I can use device font and print images/texts to a thermal printer without using the Microsoft's RawPrinterHelper.
Mar 13 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.