Initial use of zpl

Source: Internet
Author: User

I haven't written a blog for a long time. With this limited spare time, I will write my thoughts on the zpl technology I have recently studied.

Because the project needs to print the barcode, the company bought a zebra gt800 barcode printer, the first contact to print, really a little overwhelmed. step by step, I first studied the Java printing service and thought it was still useful. then I tried to print the bar code using the Java printing service. The result was so confusing that it was not supported. (There must be a way to print it, but I did not study it in depth, otherwise, Java is too weak ). later I turned to zpl, because I found that the gt800 printer Manual supports zpl and EPL programming, Shenma .... what is this? Can programming be performed? Isn't it my business ??? So Google + Baidu, looking for it, the original printer has a built-in programming language, to the printer to deliver zpl code, the printer will explain and execute the code.

Very good. Now I can find the trick. I can use zpl to type the bar code. I can type two bars at a time.

The bar code I used is 30 * 15mm thermal paper. The thermal paper can be printed without a carbon belt, provided that a printer supports thermal printing is required. Of course, my gt800 is a thermal printer.

The following is my zpl code:

^ XA
^ Lh300, 0
^ By2, 2.0, 60
^ Fo10, 20 ^ ban, 60, N ^ fdcp121001 ^ FS
^ Fo80, 85 ^ a0n, 20, 20 ^ fdcp121001 ^ FS
^ Xz

Send the above Code to the printer and print the barcode and number on the 30 * 15mm printer paper. The barcode is on top and the number is below.

Here, I would like to remind you that the printer is printed from the upper left corner (0, 0) by default. The upper left corner refers to the front of the printer and the upper left corner opposite the person, that is, the upper left corner of the printer. the bar code is in line with our perspective.

30 * 15mm of the printing paper is clamped in the middle of the exit, which requires ^ lh300, 0 to move the default printing position to the left 300pdi position.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.