Intermec PM4i ASCII symbol print - intermec

Does anybody know how to print specific symbol with Intermec PM4i printer? I need to print degree symbol (°). Here is my code:
<STX>H1;o20,10;w1;h2;f0;c2;d3,DEGREE° ;<ETX>

I don't know about the script syntax you use, I have used Intermec-DP(Direct Protocol) command syntax. Installed Generic text driver, USB cable connection to PM4i. I did not use Intermec printer driver 'cause was having problems with it.
Use Notepad to print this script. NASC 1252 chooses Windows-1252 character map, CHR$(xx) escapes any character you want. Try chr(176).
INPUT ON
NASC 1252
PP 30,540
FT "Swiss 721 Bold BT",8,0,100
PT "My label ÅÄÖ 12#";CHR$(34);" is hot 100 ";CHR$(176);" degrees"
PF

Related

ZEBRA ZPL label formats prints quotations along with text

In our space we use an ACUCOBOL-GT written program which pushes variables such as PHY NAME to a written format. The program then replaces said PHY NAME with the actual name of the pharmacy and then cups pushes the data onto the label, producing an readable output. We use zebra printers with EPL written label formats to print out these pharmacy medication labels.
Recently I wrote a format using ZPL to produce the same label as Im able to customize the data better than with the old EPL.
The only issue Im running into is that now with the ZPL the data prints onto the label between quotation marks.
So instead of it being eg Montagu Pharmacy it prints out as "Montagu Pharmacy ".
an example of the old EPL code is as follow : PHY NAME A010,025,0,4,1,1,N,
and the output of said code is as follow : A010,025,0,4,1,1,N,"MONTAGU PHARMACY "
on the output before printing it shows the quotes as well but as soon as you send it to the printer it removes the quotes and prints without them.
Here is an example of the ZPL code : PHY NAME ^FO100,025,0^A0N,18,30^FD
and here is the output of said code : PHY NAME ^FO100,025,0^A0N,18,30^FD"Montagu Pharmacy "
on the output before printing it shows the quotes and when it prints out onto the label it prints the text along with the quotes.
I understand that the ACUCOBOL-GT program creates the data with the quotations but the EPL never printed them out but the ZPL does.
Is there anything Im doing wrong or that I can do to remove the quotes so that it can print out normally as before.
I would really appreciate any assistance.
Kind regards
Hans Steyn
This is because in EPL the "DATA" to be printed is surrounded by quotes("), while in ZPL it is not, so quotes are printed. You need to remove the quotes as follows:
PHY NAME ^FO100,025,0^A0N,18,30^FDMontagu Pharmacy
References:
EPL (A command)
https://www.servopack.de/support/zebra/EPL2_Manual.pdf
page 41
ZPL (^FD command)
https://www.zebra.com/content/dam/zebra/manuals/printers/common/programming/zpl-zbi2-pm-en.pdf
page 172
EDIT 1
As per your comment, AFAIK there is no way to remove the quotes after the command reaches the printer. So the only way is to have your supplier's software send the command to some custom tool/software you have that will strip the quotes then relay the message to the printer.
[supplier software] -> [custom software] -> [Printer]
I don't know their software, but they could generate a text file that your custom tool would load and remove the quotes for example with a regex like this, that even allows for escaped quotes in the middle of the name if there are any (arrows):
This being said, it is quite surprising that removing quotes requires massive development, especially because they already seem able to generate both EPL and ZPL.

Can't print the label correctly. There is some extra spaces in the ZPL text field

Can't print the label correctly. There is some extra spaces in the ZPL text field.
There are some spaces between the text fields in line 2 and line 4.
Please kindly help.
^XA^LL496
^PW711
^FT16,50^A0N,20,19^FDL-01,02,03^FS
^FT16,100^A0N,20,19^FDU-01,02,03^FS
^FT16,150^A0N,23,24^FDUSER ID:admin^FS
^FT16,200^A0N,23,24^FDPromise Date:02/15/16^FS
^FT16,250^A0N,23,24^FDDate of Request: 11/14/19 01:48PM^FS
^PQ1,0,1,Y^XZ
Result:
L-01,02,03
U- 01,02,03 <-- Extra space
USER ID:admin
Promise Date:02/15/16 <- Extra space here
Date of Request: 11/14/19 01:48PM
My Zebra printer : Zebra Z4Mplus 203DPI
I have found this message from internet :
http://support.efficientbi.com/knowledge-base/extra-spaces-in-label-text-appear-when-sending-zpl-commands-direct-to-windows-generic-printer-driver-zebra-problem/
"When testing sending ZPL print commands direct to a Zebra printer using Generic Windows print driver, it we noticed that sometimes extra spaces would appear in the sample label. After some research, it was determined that it appears the Generic Windows print driver will cause these extra spaces to be inserted when the ZPL code is sent WITHOUT CRLF breaks."
I am using the "Generic Windows print driver" for my Zebra printing.
Here is the link that I used :
JavaScript: Send raw text to printer - no server requests/method calls, able to work offline, purely clientside
The output format totally mess up in the Zebra printing. On the other hand, the Labelary looks good to me though.
I am using the Java Vaadin framework and call the javaScript to print the ZPL command to use the "Generic Windows print driver". It worked but the format did not look to me. Extra spaces everywhere and some text did not show up at all but it looks OK in Labelary though.
I tried to print the label in client machines with Zebra printer for my Java Vaadin server side application and I finally able to make it printing but don't know why the format looks totally unpredictable.
My label size is : 3.5 inches X 2 inches label.
I can print the whole field now but still got extra space on the output.
^XA^LL496
^PW711
^FT16,209^A0N,20,19^FH^FDL-01,02,03^FS
^FT16,169^A0N,20,19^FH^FDU-01,02,03^FS
^FT16,249^A0N,23,24^FH^FDUSER ID:admin^FS
^FT16,289^A0N,23,24^FH^FDPromise Date: 02/15/16^FS
^FT16,329^A0N,23,24^FH^FDRequest: 11/14/19 01:48 PM^FS
^FT16,369^A0N,23,24^FH^FDMatl: ST30^FS
^FT7,101^A0N,113,112^FH^FDX^FS
^BY4,2.5,59^FT131,87^B3N,N,,Y,N
^FD2246284^FS
^PQ1,0,1,Y^XZ
Here is the image: There are some extra spaces in the print label from Zebra printer.
enter image description here
I know it's an old question.
I had similair problem printing through cups, turned out the default options had margins set in them. Setting them to zero and Long Line Handling to 'Wrap at Right Edge' fixed my problem:
Finally I am able to get rid of this extra spaces by adding \ +\n string at he end of each java script statement.
We need two \\ characters, the first \ character as the escape character to make it working.
Finally I am able to get rid of this extra spaces by adding \ +\n string at he end of each java script statement. We need two \ characters, the first \ character as the escape character to make it working.

Assembly problems with ascii extended characters

i want know what to do to solve this issue with the ascii extended characters, i don´t understand why print a strange symbols instead of letter that represent 0x90
i put PutStr c381
nothing happen
This has nothing to do with assembly language and everything to do with UTF-8 (which your terminal is expecting) vs. ISO-8859-1 (latin-1) or Windows 1252 (IDK which) extended 8-bit character set which you seem to be looking up codes from. It would be the same if you wrote a C program with those bytes in a char array[] and used stdio puts.
As #Fuz says, "Á does not have an ASCII code." ASCII only includes characters from 0..127 (and the low 32 are non-printable) http://www.asciitable.com/. Extended-ASCII 8-bit character sets only overlap with UTF-8 for code-points from 0 to 127.
Any program that makes a write() system call to write a 0x90 byte to stdout will do the same thing, regardless of what language it was written in. (Use strace ./program to see what yours does, or pipe it into hexdump -C). For example, in bash run printf '\x90\n' to do exactly the same thing. 90 0a is not a valid UTF-8 multi-byte sequence, so your terminal prints a � glyph (a ? in a diamond).
You could set your gnome-terminal to ISO-8859-1 or Windows 1252 (right click and use the dropdown, or find the menu entry). I'm using konsole, and it does support both those non-UTF-8 character encodings.
You'll probably want to set export LANG=en_US in that terminal only (not the usual en_US.UTF-8) if you do that, so other programs will continue to work well.
Or en_CA or whatever locale you actually use, just use the non-UTF-8 version of it so man's line-drawing will work, and so will full-screen text things like gdb's TUI layout reg mode, or editors like jed.

Using non-ASCII characters in a cmd batch file

I'm working on a .bat program, and the program is written in Finnish. The problem is that CMD doesn't know these "special" letters, such as Ä, Ö, Å.
Is there a way to make those work? I'd also like it if the user could use those letters too.
Part of my code:
#echo off
/u
title JustATestProgram
goto test123
:test123
echo Letters : Ää Öö Åå
pause
exit
When I open this file, the letters look like this:
Try putting this line at the top of the batch file:
chcp 65001
It should change the console encoding to UTF-8, and you should be able to read the file properly in the script after that.
Theoretically you just need to use the /u (Unicode) switch:
c:\>cmd /u
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
c:\>echo Ä
Ä
If you use Notepad++, you can simply change the charset. Doing this will allow you to write letters from desired charset. The western region -US. should support it.
You can do it in a drop down menu in Notepad++ or by hand by writing chcp 437. But I recommend doing this in Notepad++ as it will show you the output as it will be in the batch. So you will then easily see if you use the right code page. And at same time it's easy to switch if you want more special symbols. You can also as stated in previous posts. Try UTF-8.
You can read more about this here: http://ss64.com/nt/chcp.html. And here's a list over different code pages (check out the OEM pages): Code Page Identifiers
The command prompt uses DOS encoding. Windows uses ANSI or Unicode.
PS I'm assuming you are in the US with code page 437 rather than international English/Western European 850.
So I used Character Map to get the DOS code then find out what ANSI character that code maps to.
This is the notepad contents.
echo Ž„™”†
Which was made by putting the DOS codes for your characters into notepad.
0142, 0132, 0153, 0148, 0143, 0134 which display as the above ANSI characters.
Command prompt output
C:\Windows\system32>echo ÄäÖöÅå
ÄäÖöÅå
Alt + Character Code [Prev | Next | Contents]
Holding down alt and pressing the character code on the numeric keypad will enter that character. The keyboard language in use must support entering that character. If your keyboard supports it the code is shown on the right hand side of the status bar in Character Map else this section of the status bar is empty. The status bar us also empty for characters with well known keys, like the letters A to Z.
However there is two ways of entering codes. The point to remember here that the characters are the same for the first 127 codes. The difference is if the first number typed is a zero of not. If it is then the code will insert the character from the current character set else it will insert a character from the OEM character set. Codes over 255 enter the unicode character and are in decimal. Characters entered are converted to OEM for Dos applications and either ANSI or Unicode depending on the Windows' application. See Converting Between Decimal and Hexadecimal.
E.G., Alt + 0 then 6 then 5 then release Alt enters the letter A
From Shortcut Keys and Key Modifiers by Me at https://1drv.ms/f/s!AvqkaKIXzvDieQFjUcKneSZhDjw

code128 barcode with tilde and asterisk

I am maintaining a printing program that now requires printing both a ~ and an * in a code128 barcode in zpl.
Currently, I am using the code below that uses the ^FH to represent the tilde in hex:
^BCN,120,Y,N,N,N^FH^FDSPECIAL*MAKE_7e123456^FS
The barcode prints excluding the * and ~ as 'SPECIALMAKE123456'. Is it possible to print the tilde and asterisk in a zpl code128 barcode?
As a quick guess, since I don't have a ZPLII printer immediately available, I'd try
^BCN,120,Y,N,N,A^FH^FDSPECIAL*MAKE_7e123456^FS
(note A before the ^FH = Auto-select codeset)
Perhaps also forcing a codeset by ...^FH^FD>:SPECIAL*... may work, but subset B is the default in any case...
I located my old A300 printer, and was able to produce the required interpretation line using each of
^BCN,120,Y,N,N,A^FH^FDSPECIAL*MAKE_7E123456^FS
^BCN,120,Y,N,N,A^FH^FDSPECIAL_2AMAKE_7E123456^FS
Can't find my scanner to verify at present - but the computer room is a mite tidier...
It may depends on type of barcode.
For example, to print in 'barcode 128', you have to change code to code B, by signs >:
And: to print tilde ~, type >=. To print ^, type ><. To print >, type >0.
Look to zpl documentation, to table with Code 128 Invocation Characters.
My sample zpl code:
^XA
^BY2,3,95^FT0,206^BCN,,Y,N
^FD>:caret >< bigger >0 tilde >= end^FS
^PQ1,1,1,Y^XZ

Resources