How to get CPF file to QL420/QL220 - zebra-printers

I have to provision over 30 QL420plus printers and I'm struggling with what I thought would be easy..
We are going to use the printers in conjunction with an in-house app we have written on Windows Mobile 6. Basically the app sends a stream to of CPCL commands to print a label. As the label has non-standard fonts we have created 7 CPF files that we need to put on the printer.
However the problem is that the new version of LabelVista (now called Zebra Designer v2.2.3) will not let you "Send a Font" like you could in the LabelVista that ran on Windows XP. You have to use the "Zebra Font Downloader". This is where the problem really comes home because it will not let you add a CPF file. You have to create a MMF file and then download it to the printer. This creates one big file which has the various fonts in it. This is pretty useless when the label format looks like this:
! 0 200 200 304 {8}
LABEL
CONTRAST 0
TONE 0
SPEED 3
PAGE-WIDTH 408
BAR-SENSE 50
COUNTRY UK
VT 7 0 280 220 {0}
VB EAN{13} 1 2 60 310 230 {9}
T Got08Bpt.cpf 0 5 3 {1}
T Got05Bpt.cpf 0 5 91 TICKET PRICE
T Got010Bpt.cpf 0 5 220 RETAIL PRICE
T Got012Bpt.cpf 0 5 240 {12}
T Got014Bpt.cpf 0 20 240 {6}
CONCAT 5 105
Got28Bpt.cpf 0 0 {10}
Got14Bpt.cpf 0 7 {11}
ENDCONCAT
FORM
PRINT
I need different font sizes for each text line written on the label, yet I can't download the CPF files individually to the printer.
I can't install the old verison of LabelVista becuase it won't let me install on Windows 7. I have read the CPCL Progrmaming guide from Zebra and that's ot helpful at all. Can anyone help or my Zebra account manager is going to have a really bad day. :-)
Thanks
Mike

Try the code I pasted here Sending a font file (.cpf) to zebra Qln320 printer over WLAN
I store font files in Oracle DB, load them to Windows CE device and send'em via BT to device. The only "bad thing" in this method is that printer off after each file downloading (buy the way when you load font file via USB from LabelVista the problem the same).
To delete file from printer you can use this String.Format("! U1 do \"file.delete\" \"{0}\"\r\n", FileName.ToUpper());

You can use "Zebra Setup Utilitites" to manage your printers. This software allows you to communicate with your printers and to configure them.

Related

CPCL to Automatically Feed to Tear Off

I'm working on printing 1x3" label to a Zebra ZQ320 using C# and Xamarin Forms. Below is the code that I'm using to setup the print job and then generate the label. This code currently works great if I'm manually aligning the label properly and then printing, except for after the print job is complete, I have to press the feed button on the printer to feed to the tear off line on the label (which over time makes the label unaligned).
! UTILITIES
BAR-SENSE
SET-TOF 0
IN-MILLIMETERS
SETFF 0 2.5
PRINT
! 0 210 210 210 1
TEXT 7 0 0 15 {_location}
TEXT 7 0 450 15 {_minMax}
CENTER
TEXT 4 0 0 0 {_company}
TEXT 7 0 0 50 {_description}
BARCODE 128 2 2 40 0 85 {_materialNumber}
TEXT 7 0 0 130 {_materialNumber}
FORM
PRINT
So, I have two questions:
Is there something I can modify about this print job to force the auto-alignment to the tear off line?
Is there a way to auto-align to the next feed line at the beginning of the print job? I would not want it to auto-align if it's currently at a good position.
I am using the following as reference for what commands are available: Zebra CPCL Manual

VB6 MSComm, ports above 127 return 8002

I have a simple function that checks if we have open ports on the system, I would test ports from 1 to 256. For some odd reason when I have device at port over 127 system returns error 8002. This is very odd because when I use a different C++ application to check connection device is found and is available for reading.
This issue is related to the MSComm32.OCX, which has a limit on how many ports are available. I need to increase this limit to 256. I found a list of instruction below, but I wasn't able to find "3D 10 00" in the MSComm32.OCX file, this was on Windows 8 PC. However, on Windows XP MSComm32.OCX did contain "3D 10 00", i quickly found the string and added a new byte "FF" and deleted byte "10" using http://mh-nexus.de/en/hxd/ and saved it as a new file.
First you copy the file MSCOMM32.OCX to a safe place.
1. Obtain a HEX editor.
2. Open de file MSCOMM32.OCX
3. Find the string "3D 10 00"
4. There should be only one. This string is unique.
5. Change the string to "3D FF 00"
6. Save the file.
I don't know if this will help in your case, but you will be unable to edit the original ocx file using this procedure. You can only edit the file after it has been registered. The original is the "cookie cutter" from which all registered files are descended and it has a completely different structure. The registered file will have the "3D 10 00" sequence in it and can be modified. It would be nice if the original could be modified since all new instances would then have the modified upper port limit already in them, but Microsoft made sure that won't work.

AT+CPMS "SM" Storage

AT+CPMS? query to a SIM returns
+CPMS: "SM",0,60, "SM,0,60,"SM",0,60
OK
The total storage is 60 messages maximum, and 0 are currently stored.
All messages are stored on the SIM.
An existing legacy application fails when trying to populate all 60 message boxes because message box 55 is the last successful write location.
When trying to populate the spaces 56-60, the command returns CMS Error 322 which is a memory full error.
The text in each SMS is simply "P H" which is 3 ASCII bytes, so each text doesn't use an excessive amount of memory.
Has anyone an explanation why the spaces 56-60 are unavailable, although the CPMS? query shows them as available? Thanks.

Labels not printing issues in Win 7

First of all, we have an application developed in .Net and used on a Win XP platform for years with very little problems.
We recently switched to Win 7 64bit and we are having issues with labels not printing.
When the user selects a job it may have several products it needs to print per order line.
What is happening, is sometimes labels aren't being printed for an specific order line.
For instance, let's say we have job X with 8 order lines to print.
The application sends the labels to a preview window using crystal reports and then immediately sends it to the printer without any human intervention.
line 4 with quantity 1, doesn't print
line 5 with quantity 1, doesn't print
line 6 with quantity 1, doesn't print
line 7 with quantity 3, doesn't print
line 1 with quantity 1, doesn't print
line 2 with quantity 2, prints
line 3 with quantity 28, prints
line 8 with quantity 1, doesn't print
If this same job is printed on a Win XP PC it doesn't have any problems and all the lines and appropriate quantities are printed.
We are using Zebra setup utilities 1.1.9.1060.
we have a
ZM400 with firmware v53.17.11Z
ZM400 with firmware v53.17.9Z
ZM400 with firmware v53.17.5Z
ZM4Plus with firmware v60.14.3Z
These printers are connected to the PC over the network via a TCPIP address.
Also, we are using Windows driver Z4M 203DPI printer version 2.6.77 (Build 3827)
Let me know any other information you may need.
Thank you,
Tim Caldwell.

HID device info structure from GetRawInputData

Where can I get the structure for an HID device?
For example:
raw data from a device, using GetRawInputData:
( 0 137 117 0 146 130 24 128 0 )
( 0 137 117 0 146 130 8 128 0 )
/\
at this I can see that || there is being a button released
that means, at the 6-th char at 4-th bit
By analyzing the raw stream I can figure out where are the buttons, switches and analog data. Is there a way to ask this information from Windows.
My main goal is to basically get structure:
Button - 6th char, 4th bit.
Analog - 2nd char
Switch - 6th char, 0-3th bit.
The only solution I found was HID Descriptors. But I'm not sure how to use them.
After reading documentation I felt like running into a brick wall. Is there
maybe a good example how to use them or a book that describes them better. (Or a easier way
doing it without descriptors)
I found HidP_GetButtons and HidP_GetUsages but still no idea how to extract the structure (as described above).
Oh, you have to use GetRawInputData. There is a somewhat crummy example on msdn.
The problem seems to be that each device has it's own structure. There doesn't seem to be a universal way through the win32 api to get the interpretation of the structure.
The combination of
GetRawInputDeviceInfo which gives you a RID_DEVICE_INFO struct
GetRawInputData
GetRawInputBuffer
Seems to get you all the information you can from win32.
After that, you probably need some external source of information (or generated by you), that describes specific fields etc.

Resources