473,387 Members | 3,801 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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

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
1 6468
deric
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

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

Similar topics

2
by: Larry Cheung | last post by:
I want to write a program to monitor each local printer When a print job is sending to a printer this program could be fired and capture the printed content as an image. It is easy to use API...
1
by: Jason | last post by:
For some reason, most but not all reports printing from an access application our client is using will not print any images on the reports or forms. One report will print the image and data...
0
by: Kartik Ganesan | last post by:
Hi ALL, I am developing a component to generate Labels for FEDEX ship management.The response that I get from Fedex servers is parsed and I am able to store the instructions in a text file(done...
16
by: Neal | last post by:
Hi, I saw the VB6 Code to do this at this link: http://www.dotnet247.com/247reference/msgs/11/56581.aspx The VB6 Code reads as follows: Private Type Rect Left As Long
0
by: Matt | last post by:
Has anyone had the occasion to write an app to print to a Zebra barcode printer? We have a Z4M I am working with. I have it working fine, in sending ZPL commands to a text file then dumping it to...
1
by: Paolo matador | last post by:
Hi All, i have a little problem with my web application. I need to print a web page, shrinked on a thermal printer that not supporting A4 format. The printer is this:...
56
by: peng | last post by:
Hi, I am development a project using C#.Net. Inside application, it needs to print labels on different Zebra label printers on the network. I used a shell script, but it only worked on the...
1
by: scotter86 | last post by:
Hi everyone, I have kind of an odd question. What I'm trying to do is have a program run when I want to print something. A little background on my situation is, I'm sharing a little thermal...
12
by: ThaSaltyDawg | last post by:
I have an application that prints to a Thermal Printer..These are the older printers (brand Zebra 3742) and uses the Serial Com Port 1 & 2. I have that working. We now have two new printers (brand...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.