You can use the functions/procedures/classes that a programming language provide to program a printer. Another alternative is, sending raw printing command to the printer itself. Each printer has their own instruction sets. Usually what happens, when you use built in functions they convert your procedure/function call to printer language and send it to the printer. They do it, using the printer driver
You can do that by yourself by sending raw printer commands to the printer itself. Windows has an API called ‘Escape’ that can send raw texts/printer commands to the printers without using the driver. Now you need to know the language that the printer uses and use ‘Escape’ function to send raw print commands to the printer.
I personally have working experience with intermec label printers. Intermec label printers support two different kinds of printer languages. IPL (Intermec printer Language) and DP (Direct Protocol). You need to check what your printer uses. The printers that use DP come with a tool named fingerprint installed on the printer itself. This fingerprint tool understand DP language and executes the printer in that way. Good thing is, fingerprint supports dynamic printing language that means you can use if then else, for, while etc in your printing language.
An example DP program can be as follows:
INPUT ON
PRPOS 10, 1000
PRTXT “hELLO hOW aRE yOU”
PF
LAYOUT RUN
INPUT OFF
YOU HAVE TO SEND THESE RAW PRINT COMMANDS USING THE ESCAPE FUNCTION.
From: http://sitestree.com/?p=4719
Categories:4
Tags:
Post Data:2007-03-18 00:05:38
Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
(Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a>
In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
<a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>