<p>Does anyone know how to print a barcode to the Intermec PB20 bluetooth printer from a Windows Compact Framework application? We are currently using the Intermec LinePrinter API but have been unable to find a way to print a barcode.
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­</p>

[{'answer_id': 26356, 'author': 'Martin Marconcini', 'author_id': 2684, 'author_profile': 'https://Stackoverflow.com/users/2684', 'pm_score': 0, 'selected': False, 'text': "<p>Last time I had to print Barcode (despite the printer or framework) I resorted to use a True Type font with the Barcode I needed. (In my case was EAN-13 something), an european barcode.</p>\n\n<p>There are fonts where you simply write numbers (and/or letters when supported) and you get a perfect barcode any scanner can read :)</p>\n\n<p>Google is your friend. I don't know if there are free ones.</p>\n"}, {'answer_id': 26373, 'author': 'Steve', 'author_id': 620435, 'author_profile': 'https://Stackoverflow.com/users/620435', 'pm_score': 0, 'selected': False, 'text': '<p>Thank you for your answer. There are free fonts available -- However, the PB20 is a handheld printer with a few built-in fonts. It has the capability to print barcodes and can be manipulated directly via the serial port. Intermec provides a .Net CF API to make printing "easy", and it is using this API that we have been unable to figure out how to tell the printer to print a barcode.</p>\n'}, {'answer_id': 27081, 'author': 'Tim Williscroft', 'author_id': 2789, 'author_profile': 'https://Stackoverflow.com/users/2789', 'pm_score': 0, 'selected': False, 'text': "<p>Ditch all API's and use a serial port API directly.</p>\n\n<p>Talk the printers language and you can get decent results.\nEvery other approach leads to frustration.\nNot so pretty, but that is the way my old factory worked.\n4k print jobs per day, and none ever missed.</p>\n"}, {'answer_id': 27087, 'author': 'Frank Krueger', 'author_id': 338, 'author_profile': 'https://Stackoverflow.com/users/338', 'pm_score': 0, 'selected': False, 'text': '<p><a href="http://www.squaregear.net/fonts/free3of9.shtml" rel="nofollow noreferrer">Free 3 of 9</a></p>\n\n<blockquote>\n  <p>This is 3 of 9 (sometimes called "code\n  39"), a widely used barcode standard\n  that includes capital letters,\n  numbers, and several symbols. This is\n  not the barcode for UPC\'s (universal\n  price codes) found on products at the\n  store. However, most kinds of barcode\n  scanners will recognize 3 of 9 just\n  fine.</p>\n</blockquote>\n'}, {'answer_id': 28168, 'author': 'Steve', 'author_id': 620435, 'author_profile': 'https://Stackoverflow.com/users/620435', 'pm_score': 2, 'selected': True, 'text': '<p>Thank you all for your thoughts. Printing directly to the serial port is likely the most flexible method. In this case we didn\'t want to replicate all of the work that was already built into the Intermec dll for handling the port, printer errors, etc. We were able to get this working by sending the printer the appropriate codes to switch it into a different mode and then pass direct printer commands that way.</p>\n\n<p>Here was our solution in case anyone else happens to encounter a similar issue working with Intermec Printers. The following code is a test case that doesn\'t catch printer errors and retry, etc. (See Intermec code examples.)</p>\n\n<pre><code>Intermec.Print.LinePrinter lp;\n\nint escapeCharacter = int.Parse("1b", NumberStyles.HexNumber);\nchar[] toEzPrintMode = new char[] { Convert.ToChar(num2), \'E\', \'Z\' };\n\nlp = new Intermec.Print.LinePrinter("Printer_Config.XML", "PrinterPB20_40COL");\nlp.Open();\n\nlp.Write(charArray2); //switch to ez print mode\n\nstring testBarcode = "{PRINT:@75,10:PD417,YDIM 6,XDIM 2,COLUMNS 2, SECURITY 3|ABCDEFGHIJKL|}";\nlp.Write(testBarcode);\n\nlp.Write("{LP}"); //switch from ez print mode back to line printer mode\n\nlp.NewLine();\nlp.Write("Test"); //verify line printer mode is working\n</code></pre>\n\n<p>There is a technical document on Intermec\'s support site called the "Technical Manual" that describes the code for directly controlling the printer. The section about Easy Print describes how to print a variety of barcodes.</p>\n'}]
['https://Stackoverflow.com/questions/26354', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/620435/']