ZPL - How we can control width of ^BC (Code 128) bar code - zpl

We are using Zebra Programming Language, ^BC (Code 128) bar code
currently using this command -
^XA
^FT230,140^BY2
^A0N,40,30
^BC,70,Y,N,N,A^FDABCDEFGH123456789012
^FS
^XZ
it is printing barcode too long. so please help me to control width of the barcode and how we centre aligned barcode also.

Change ^BY2 to ^BY1 for width
^FT230,140 defines the position being 230 dots from left and 140 from top, so to center, change 230 accordingly

Related

ZPL script for label triple

I'm getting trouble printing some labels with a Zebra GK420t.
I have the next designer and how I need to print:
And the Zebra Designer Essentials generate the next ZPL script:
CT~~CD,~CC^~CT~
^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR3,3~SD23^JUS^LRN^CI0^XZ
^XA
^MMT
^PW192
^LL0823
^LS0
^FT109,754^A0B,28,28^FH\^FDTEXTHERE^FS
^FT109,482^A0B,28,28^FH\^FDTEXTHERE^FS
^FT109,211^A0B,28,28^FH\^FDTEXTHERE^FS
^PQ1,0,1,Y^XZ
but it only print the center text and it vertically.
What is wrong with my ZPL/design?
It is my first time with this kind of printer, so i'm very newbie and I need use Browser Print, using a Javascript Library, and all ok here. But when I printed it, everything is wrong:
Only print center text
It prints vertically
Text is cut
Thanks
What Mark said is correct, but what I want to add is that I've the feeling you created the label in zebradesigner using the landscape orientation and this explains the B parameter and also why the three text fields are vertically aligned instead of being horizontally aligned.
What you can do instead of trying to manually correct the ZPL code, is to generate a new label using zebradesigner, but setting the orientation to portrait and unselecting the "rotated" option.
Second thing is to configure the label layout in this way, just changing the dimension and the horizontal gap according to the labels you have.
This should generate a valid ZPL code.

https://fonts.googleapis.com/css?family=Libre Barcode 39 Extended Text is not readable by black copper 1d barcode scanner

i am stucking in problem i have designed application in asp.net and i have use
"https://fonts.googleapis.com/css?family=Libre Barcode 39 Extended Text"
and it works fine It works fine when showing in browsers
but when i use black copper 1d barcode scanner it is not reading the barcode
what i m doing wring please help me out
thanks
asad
this barcode scanner i am using
enter image description here
Barcodes need to render as monochrome black/white images. Fonts on the other hand render anti-aliased, meaning up to 256 level grayscale. If you copy your barcode into an image editor and zoom in, you will see that the black bars do not have sharp edges - they are blurry. Part of the the blurriness is also caused by the "cleartype-style" sub-pixel rendering that most font engines use.
You will be better off if you can render the barcode as an image, where you have pixel-level control.

Rotating lable for counting scale

I am working on making a label for a zebra printer that connects to a counting scale, and when you hit print on the scale the label prints from the printer showing the count. I have been modifying a template that I found for the label and I need to rotate the barcode and text on the label 90 degrees and I am having some issues with this.
I have already tried using the commands such as ^FWR at several different points in the code, however this does not seem to work.
Here is my code for the label.
FK"AUTOFR"
FS"AUTOFR"
V00,20,N,""
A50,380,3,3,1,1,R,"COUNT"
B75,380,3,1,2,5,50,B,V00
PA1
FE
FI
Example of 90° rotated barcode and text.
^XA
^CFA,30
^FWr
^FX section with text
^FO400,100^FDTest Label^FS
^FX section with barcode 12345678
^BY5,2,170
^FO100,100^BC^FD12345678^FS
^XZ
Rotating a label in requires you to not only rotate each piece of text and barcodes, but it also requires you to adjust the placement of the text as it rotates around the "origin" point.
Your label now looks something like this in ZPL:
^XA
^CFA,30
^FWR
^FO75,330^FDCOUNT^FS
^FO75,380^BY3,1,2^BC,50^FD123456^FS
^XZ
If you rotate the same label properly, it comes out to:
^XA
^FWR
^CFA,30
^FO235,75^FDCOUNT^FS
^FO175,75^BY3,1,2^BC,50^FD123456^FS
^XZ
There is more detailed descriptions of the rotation and how it works in the ZPL Manual Field Interaction Appendix If your label is large and/or complicated, it might be easier to use a label design tool to do it rather than manually.

How to determine tab width(in pixels) for non-monospace font?

I'm developing a text renderer library which is similar to FreeType for my game. I don't know how to determine the tab width.
When I'm handling control characters, I found a problem, that is my text renderer is not only for monospace fonts but also for non-monospace fonts. I know that for monospace fonts, the width of the tab aligning can be 4 or 8 spaces, depending on the usage of the text renderer (AFAIK, most of the programming IDEs intend tabs to 4 spaces; and for creating tables, the software often intend tabs to 8 spaces). But for non-monospace fonts, which value should I use?
After watching lots of IDE's behavior of handling non-monospace fonts, I found the answer:
Use the width of space character ('\x20') as the unit of the tab width, and the tab width should be 4 spaces by default.
Also I gave a choice for the users to determine how to align characters for non-monospace fonts, one is to align characters normally as we see how other programs (such as Microsoft Word, Chrome, etc.) align non-monospace font text, the other one is to force aligning characters as monospace style by fix the width value of each characters, and the fixed width value were determined by scan all of the alphabets, digits and punctuations, and find a maximum value for it. And for full-width characters, I just let the width value x 2.

Style text field with line

I'm looking for a way to create a text field that is just a line (png or something) and on that line the user can type.
What I have is a line (png) and set this as background off the text field. Then vertical align this so the line is in the bottom.
It is almost what I want to achieve, only the text is floating a bit.
Someone could help me?
Working in xCode btw.
This is achievable by using UITextField and UIImage.
1) UITextField with
BorderStyle: UITextBorderStyleNone
Vertical Alignment : UIControlContentVerticalAlignmentBottom
2)Place UIImage right bellow the text field and add line.png

Resources