ZPL script for label triple - zebra-printers

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.

Related

ZPL Center image within a Graphic box

I have logos of various sizes. I am trying to center them on a label within a ^GB
Is this possible or is there another way of doing this?
Code I tried: ^FO10,295,2^GB585,90^GFA,{items.manufacturer_logo}^FS
The ^GB command is used to draw boxes, not to print graphic fields and the parameters you put after the GB command are the width (585) and height (90) of the box.
Regarding the graphic field (^GF), there isn't a parameter in this field you can use to align to the center the image, so you need to manually enter the coordinates to center the field in the ^FO command, but if you're working on a software which can dinamically calculate the position of the fields, you can maybe do it automatically.
When it comes to design a label in ZPL language, my advice is usually to use zebradesigner, create the label and then export it using the "print to file" option you can find in the print view.
You can download zebradesigner for free from here
https://www.zebra.com/gb/en/support-downloads/printer-software/zebra-designer-3-downloads.html

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.

An easy way of setting a ZPL template as landscape rather than portrait?

Is there a simple way of setting an entire label to print in landscape orientation rather than portrait? I tried the FWR method but it doesn't seem to affect it at all.
I get the feeling i'm going to have to completely realign my fields and graphic boxes if i want to make it landscape.
^FWr command changes orientation of a field.
If you want to set whole label orientation, use ^POa instead, like described e.g. in Label Rotation and Orientation for ZPL based Desktop and Tabletop Printers document.
The ^PO command will only allow you to rotate in 180 degree increments, so that will not help you here.
Unfortunately, the answer to your question is "No." In order to switch between landscape and portrait modes, you will need to manually rotate/reposition/realign all your graphic boxes, text fields, and barcodes. (I feel your pain though, I've had to do this before and it is not fun.)

Java Fx : strange behaviour when trying to write a Label vertically

I have noticed a strange behaviour concerning rotated texts (Label,...) in JavaFx...
Originally, I just wanted to be able to display Labels vertically in a GridPane. The first problem is that there is no simple way to tell a Label to display its content in a given direction/orientation. It would be nice to have something like the Side property of the tabPane which would allow to easily turn the text around...
Anyway, I then resigned myself to use the Rotate function to turn my Label. That is when the strange thing began to occur...I am putting my Label in a grid cell which would not be large enough to display the full text if it is not rotated but the text should be able to fit once rotated. The problem is that the text appears wrapped even when it is rotated as if the wrapping test were done before the text is actually rotated... The problem can be seen on this screenshot http://hpics.li/e210f2f : the text that should be displayed is written in the Tooltip and we can see that only the first letter of the rotated text is displayed in the cell grid even though there is more than enough space to display it all...
Anyone has any idea on how to solve that ? Is it the intended behaviour or is it just a little bug ?
Thanks in advance for your answers.

Exported shapes as image with vba in powerpoint with a white space in the button and top

I want to export certain shapes in powerpoint as images. For that I am using the following code:
ActivePresentation.Slides(1).Shapes(3).Export "C:\dink_template\created_files\testimg.jpg", ppShapeFormatJPG
I also tried with other image formats:
ActivePresentation.Slides(1).Shapes(3).Export "C:\dink_template\created_files\testimg.png", ppShapeFormatPNG
and I get this image:
Here you cannot notice because the white peace that appears in the image button (and also a bit in the top) is mixing with the page but if you make inspect element on the photo you will see it.
As you can see in this other image in powerpoint the shape fix perfectly and it is not bigger that the image:
Why is appearing this white peace in the top and in the button? How can I export the image without them?
EDIT
I know when it is happening. Because I try with other ones and sometimes they where not appearing and sometime it was. The problem is that when the text you write in the shape is so close to the border and you export it as image it export with this white space. Now the question is... how can I solve this?
One option would be to adjust the size of your shape and/or the size of the text accordingly to the total text length, before exporting it as an image, in order to make sure that your text will never be too close to the border...
Something else: have you checked the margins properties of your shape? Putting them to 0 might help a bit.

Resources