2

So I'am working with a zebra label printer, normally you use FO to position things susch as text, FO starts from the top left corner of the label. is there a way to start from the top right corner? I know you have PW and that starts at the top middel of the lable.

thank you for helping.

john snow
  • 23
  • 3
  • 1
    What is "FO" and what is "PW"? – wurtel May 13 '19 at 14:43
  • Most label printers come with a label printing application (I'm not familiar with what comes with Zebra printers). They include a template that at least provides a correctly sized box, and prints to the correct area of the label. You just right-justify the text. Starting in the middle of the label just means that it defaults to centering the content. Most of that software has options for alignment. If you don't have such an application, you can create your own template in your favorite word processor, or use general purpose label software. (cont'd) – fixer1234 May 13 '19 at 21:17
  • The label is just a small page. You may need to play with the orientation. To get more specific, you would need to clarify what software you're using and the particulars of the label. – fixer1234 May 13 '19 at 21:17

1 Answers1

2

The ^FO command by itself goes to the top left corner of the field. However, you can add X and Y coordinates to the command. These coordinates are in printer dots, i.e. at 200 dpi, X=200 will be 1" to the right. The top left corner is at X=0, Y=0. The command ^FO by itself is equivalent to ^FO0,0. In your case, Y will still be 0 but you need to figure out the X coordinate of the top right corner. That depends on the label size and printer resolution.

If you want to start in the top right-hand corner, you probably also mean that the label should be right justified. In that case, you can add a 3rd parameter to ^FO. Check that your printer supports this. For right justification that parameter is 1. So, for a right justified label, starting at X coordinate 800 (4" at 200 dpi), the command is:

^FO800,0,1

Note that ^PW sets the label width.

More information about ZPL commands can be found in the ZPL Programming Guide.

hdhondt
  • 4,149
  • 2
  • 14
  • 15