Print a barcode to a Intermec PB20 via the LinePrinter API - c#

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.
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­

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.
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.)
Intermec.Print.LinePrinter lp;
int escapeCharacter = int.Parse("1b", NumberStyles.HexNumber);
char[] toEzPrintMode = new char[] { Convert.ToChar(num2), 'E', 'Z' };
lp = new Intermec.Print.LinePrinter("Printer_Config.XML", "PrinterPB20_40COL");
lp.Open();
lp.Write(charArray2); //switch to ez print mode
string testBarcode = "{PRINT:#75,10:PD417,YDIM 6,XDIM 2,COLUMNS 2, SECURITY 3|ABCDEFGHIJKL|}";
lp.Write(testBarcode);
lp.Write("{LP}"); //switch from ez print mode back to line printer mode
lp.NewLine();
lp.Write("Test"); //verify line printer mode is working
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.

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.
There are fonts where you simply write numbers (and/or letters when supported) and you get a perfect barcode any scanner can read :)
Google is your friend. I don't know if there are free ones.

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.

Ditch all API's and use a serial port API directly.
Talk the printers language and you can get decent results.
Every other approach leads to frustration.
Not so pretty, but that is the way my old factory worked.
4k print jobs per day, and none ever missed.

Free 3 of 9
This is 3 of 9 (sometimes called "code
39"), a widely used barcode standard
that includes capital letters,
numbers, and several symbols. This is
not the barcode for UPC's (universal
price codes) found on products at the
store. However, most kinds of barcode
scanners will recognize 3 of 9 just
fine.

Related

Zebra s600 print script

This is my first try to create a c# script to print a label from a Zebra s600 printen. I have a really hard time finding a good guide on the internet about how this would work. The Zebra s600 is also a very old model. Right now I am using the SDK from Zebra:
https://www.zebra.com/gb/en/support-downloads/printer-software/link-os-multiplatform-sdk.html#text_f34a
But I found out that the s600 is not included in the support list. My script does activated a little greenlight on the printer the moment I run the script. But nothing else happens. I also have no idea how to search further for my issue. Every search is a dead end.
I did followed this tutorial because I could't find any example on the web:
https://www.youtube.com/watch?v=RvWG9_rE9rg
Seems like it still supports ZPL. Have you tried sending ~WC? Try opening a command prompt and doing echo ~WC > LPT1 or echo ~WC > COM1.
If that prints a config label, then you can either use the ZDesigner drivers to print to it as a normal windows printer. If you do not find a driver for the exact model of printer, just select one with the same DPI and PDL.
Or you can write ZPL directly to the printer. To figure out what ZPL to send, you can use ZebraDesigner. The free versions are sufficient. Avoid the XML functionality unless you find the printer to support it - it was introduced after that series, I think.

Tfint (Interleved 2 of 5) not recognized on Panasonic FZ-F1 using UWP Sample

I am using this example, along with a Panasonic FZ-F1, which is currently restricted to build 1511 (10586) because a newer version of Windows 10 Mobile Enterprise in not available yet.
The issue I've encountered is that it seems to be unable to identify TfInt (I2of5). It successfully scans other barcodes with no issue. The included app (which appears to be in Silverlight), Barcode Reader has a demo mode, which seems to work fine with I2of5. However, in order for it to work correctly, I had to set the barcode length (10 in this case). I don't see a way to set this using the UWP sample.
I set TfInt as an ActiveSymbology...
await claimedScanner.SetActiveSymbologiesAsync(
new List<uint> { BarcodeSymbologies.TfInt }
);
But without being able to assign the length, it doesn't seem to recognize I2of5.
Suggestions as a work around are welcome.
Win10 Ver1703 for FZ-F1 has been available.
http://pc-dl.panasonic.co.jp/toughpad/windows/handheld_tablet.html#F1_sched
http://cpt.pc-dlp.panasonic.co.jp/toughpad/download/osv/FZ-F1_Upgrade1511to1703_r1.0.pdf
Panasonic ended up swapping out the hardware. The reason the barcode didn't work is that it requires that the symbology to be configured in an app on the device that is pre-installed. This app wasn't present on any of our devices because somehow we received test units.

ESC \ POS Command - Setting User Settings

First I'd like to say that long time reader of this site! Has saved me a lot from some problems that I've run in to while learning how to develop applications (specifically in c#).
Now on to the problem I am facing. I am currently developing an application that will set the speed and the power supply unit values on the EPSON TM-T88V to the values of 13 and 3 (speed and PSU). I have been using the provided commands located here on EPSON's Site. I am able to communicate with the printer by sending simple commands such as cut paper and line feed using hex in c# (using RawPrinterHelper), So I know I am able to connect to it. When I attempt to enter the user setup by using the values provided in their website, the printer seems to just "lock up". I have to rest the printer after about 2 minutes for me to be able to use it again. Thankfully, it doesn't seem like its writing anything at all to the printer, which is probably why it hasn't failed yet.
Does anyone have any experience changing settings to POS printer (specifically EPSON) who could help me with this? Usually there's a tool that will allow you to just send a .txt file with HEX values (like TPGs), but I cannot seem to find anything like that for EPSON POS printers. Any help would be greatly appreciated! Thank You
Try to reset a printer (ESC #) before start a user settings commands. It helped for me in the same case.

How to integrate the scan barcode option on my WinCE application?

I'm new to the CE environment, I'm creating an application for a mobile computer with a barcode scanne that uses Windows CE 5.0 (Motorola mc3000).
I'm using VS 2008 and I'm programming with C#.
I made a litte demo project that it runs successfully on the device. My application have a scan task so it need to use the Barcode reader: Access to the scan hardware, make it run, read the returned result and display it into a textBox!
The problem is that I don't know how to integrate the scan part into my application.
Any help on this?
Well, first step would be to look in the documentation for the Motorola MC3000. I don't know if there is one for the MC3000 but I know that in the Motorola EMDK for .Net they provide quite a few sample C# VS2008 projects and a couple of them are for barcode reading.
Kobunite has posted you the first step. So go to the download page of the Motorola EMDK an watch the examples. After that you have to reference the Symbol.dll and Symbol.Barcode.dll in your project (local copy = true). Then you can begin to write your "barcode-class" with an event-handler for the scan-event. When a barcode is scanned via the hardware-trigger the event will throw an then you can place the barcode-string in your focused textbox or do something else with it (e.g. filtering in a datagrid). Hope this helps.
Just to simply scan a barcode there is a much easier solution.
By default the barcode scanner should also output into the keyboard cache.
To test it simply open a text editor and scan a barcode. If the barcode appears then you are good. You can simply use a normal textbox and make sure focus is on it.
The problem is however that you need a terminator. The easiest solution is to append the Carriage return symbol to any scanned value. Most handheld devices have a utility somewhere where you can append characters to scan. Appending '\r' (without quotes) works for most devices.
This means that you don't have to do a single thing extra on your code. Just make sure the textbox support keyboard input and starts processing when enter is pressed.
Motorola uses the utility called DataWedge. Here is a link to it's manual (PDF file). Look at page 5 for carriage return and line feed. DataWedge Manual (old but should still help)
The main advantage is that it allows the user to also use manual input in case the barcode is damaged. The disadvantage is that you lose the barcode metadata (i.e. barcode encoding type, etc.) But this is not required 99% of the time anyway.

How can i get the Printer details from server using c#

I need to create a C# application that will run in server in that i need to get the printer details like printer status, number of pages printed.The system which is requested for the print that systems username and system name.
If the system connected in the network requested for printing then i need to get the system details in my application
how can i do this?.
sorry for my bad English.
The classes in the .NET 3.0 System.Printing namespace are your starting point. Beware that the amount of functionality available is pretty limited. You can't get an event out of them that tells you that a new print job got started. Something as simple and obvious as counting printed pages is not possible.
This is a core architectural limitation, Windows leaves a lot of the printing management up to a the printer driver. And every printer manufacturer makes their own. Which explains that counting pages isn't supported for example, the driver sends some kind of proprietary control command to the printer to tell it to generate copies of a document rather than Windows spooling the same document repeatedly. That's efficient but not easily observed. These manufacturers also usually have their own printing management software, you probably ought to look at that first.

Categories

Resources