How is height determined in this Zebra ZPL II ^A command? - zebra-printers

I don't understand how the height of the font is determined in the following series of ZPL II commands:
^XA
^FT22,79
^A0N,,25
^FDHello^FS
...
...
The height parameter was omitted so, according to the documentation that I have, it should use the last ^CF value, but that was never issued. So the startup value of "9" should be used but I can assure you that the printed word "Hello" is taller than 9 dots.
How is the height determined?
Thanks in advance,
Mike
I printed this and the word "Hello" was taller than 9 dots. I was expecting 9 dots.

Related

ZPL - Zebra Concatenate 2 values

I would like to concatenate 2 values in the Zebra Programming Language (ZPL)
Var FN3 contains: 123456
This line currently prints the value 123456
^FO260,90^A0N,70,50^FN3^FS
^FO: field orientation, with coordinates.
^AON: font type and size
^FN3: variable
^FS: field stop
I tried this:
^FO260,90^A0N,70,50^FDP^FN3^FS
So we want to have printed: P123456
I cannot find any concatenate function or how to do this in the label.
Any tips or tricks or functions I do not know about?
The usual way to achieve that result is to use ^FT rather than ^FO, for example:
^FT260,160^A0N,70,50^FDP^FS^FT^A0N,70,50^FN3^FS
Note the second ^FT with empty parameters. That indicates to continue formatting the text where the last ^FT left off.
Unfortunately, using ^FT means you have to change your coordinates, specifically, your y values. ^FO positions from the upper left corner. ^FT positions from the baseline of the text.

ZPL set label size reserve print

I have some information I want to print out with a label size of 600 however I can't seem to get it to print the opposite way.
zpl code
! U setvar "ezpl.media_type" "mark"
setvar "zpl.label_length" "600"
END
^XA^LH110,10^FWR
^FO400,0^ASR,18,10^FDInformation^FS
^FO350,0^ASR,18,10^FD Instructions:^FS
^FO350,200^ASR,18,10^FD [instructions] ^FS
^FO250,0^ASR,18,10^FD address:^FS
^FO200,0^ASR,18,10^FD [address]^FS
^FO150,0^ASR,18,10^FD [street]^FS
^FO100,0^ASR,18,10^FD [city]^FS
^XZ
the issue I am having is it prints like.
"space" instructions : do this inste
and cuts it off after a few words. I can't seem to do negative x axis values to just force it to start at the beginning.
So is there a way to make it print in reserve?
so its
"way less space now" .xob siht htiw daetsni siht od : snoitcurtsni
Use ^LL to sent the Label Length. You are not setting that in the ZPL that you show as your example. You can see the Zebra ZPL Programming guide to see details on how to use the command. If you want 600 pixels long, then this should be your first line of ZPL:
^XA^LH110,10^LL600^FWR

ZPL to print strike through

Is there a way to use ZPL to print text with a strikethrough (a line through the text)?
I need to be able to print something and indicate that it was there. I have looked through the ZPL programming guide and I have not found any way to alter the font....
An alternative approach would be to draw a line through your text. Here is a sample. You would need to calculate the points of the line based on the coordinates of the text:
^XA
^FT62,93^A0N,42,40^FH\^FDstrikethrough^FS
^FO41,76^GB268,0,5^FS
^PQ1
^XZ
AFAIAA, No.
Could you simply draw a line over the required text? Perhaps you could use or manufacture a downloaded bitmap font which is "struck through?"
OTOH...
To underline - use a monospaced font like AA,AC,AD,AF or AG
Use
^FO350,50^AGR^FDwhatever,milk,butter,salt^FS
^FO340,50^AGR^FD ____ ______^FS
where the underline here is under milk and butter, you can adjust the offset by trimming the FO's X and Y positions by a few dots (10 X here). Naturally, that can be raised for strikethrough, too...

Position of Text in a TextBox

Hi I have a textbox containing some text. I am looking to replicate the red spelling mistake squiggle type behaviour.
Using WinAPI I can
draw the squiggle between 2 points.
find out the height and width of
the word to be "squiggled".
What is the api call (or perhaps the methodology if it is more than a single api call) to find the position of that word in the text box so that I can position the sqiggle undeneath it.
Also, what are the messages I need to trap to ensure that the squiggle is redrawn. I'm currently only using WM_PAINT, which obviously isn't good enough.
EDIT (3 Sept 2012):
FYI, Here's where I got to so far. Needs a lot of refining but shows basic principles
https://gist.github.com/3607272
Many thx
S
What might work is using an auto-sized label. Make sure the fonts in the label and textbox are identical.
Detect the number of rows that are before the sentence containing the misspelled word.
Fill the label caption with the number linefeeds (vbcrlf) you got from question 1.
Append the words from the misspelled line (up to the misspelled word) to the labels caption.
The label size should now be identical with the beginning of the misspelled word.
Example text:
This is my first line.
And my second line.
And over here i have my mispeled word.
Label caption output should be (ignore the dots, they are empty lines):
.
.
And over here i have my
The labels height and width should match the position in the textbox, unless you have scrollbars. If the textbox has borders then you should add a fixed value to the height and width to get an exact match.

ZPL - how can we increase width of ^BC (Code 128) bar code

Am doing a formatting of barcode label.
We are using Zebra Programming Language , ^BC (Code 128) bar code
As i increase the size of ^FD Field Data , the barcode width is increasing.
But how can i print a broader bar code for a fixed small length data.
I saw magnifying factor for some other types like UPC E barcode.
But i dont find any magnifying factor for ^BC code 128 barcode.
I put some space and it increase width but not effective while reading barcode
Look at the ^BY command
^XA
^FO100,100^BY7
^BCN,100,Y,N,N
^FD123456^FS
^XZ
The first parameter is the width of the barocdes after it. The default is 2, range is 1-10
To change the font, size, and placement of the text on the intrepretation line, use the ^A command
^XA
^FO100,100^BY7
^A0N,40,30^BCN,100,Y,N,N
^FD123456^FS
^XZ
I know it's too late to answer your question but I thought it might help others.
I faced the same issue and solved by this trick where I set BC mode to A (for automatic).
example:
^BY3,3,55^FT12,172^BCN,,Y,N,,A
^FD123456789^FS
this resulted a better barcode width for me than when mode is set to its default value.
Note: still you can change BY to suit your needs.
You can refer to the documentation for more information zpl BC command

Resources