Monday, June 18, 2018

Jzebra setting on Ubuntu

jZebra is a Java applet which allows you to print barcodes, receipts, and more from a Web page to your device printer. It sends raw print commands and basic HTML and PDFs to your raw, PostScript, or LaserJet printer. It has been tested with Firefox, Safari, Internet Explorer, Chrome, and Opera. It supports parallel, serial, USB, and network printers.

To start installing jZebra, you need to install JDK and JRE on your system. Check your JDK by type "java -version" on your terminal and it must show something like this:

     java version "1.7.0_60"
     Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
     Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)

In your browser type 'about:plugins'. If your JDK and JRE installation is correct, Your browser will show something like this (On Firefox):


If everything is ready, we will start jzebra instalation.
  1. Download the source in here Jzebra.
  2. Extract The File. There's a bunch of file, but we will using "sample.html" and  "qz-print.jar". Make sure "sample.html" and "qz-print.jar" resides in the same folder/location.  You can see this working example with jZebra Printer Device. Download
  3. Set Your Device Printer, Go to system settings > Printing.
  4. Add Printer (or New) and select your printer device.
  5. Select printer make "Generic" Click "Forward" 
  6. Click mode "Raw", Drivers "Generic Raw Queue en". Click "Forward'
  7. Fill Name and Apply
  8. For Configuration Margin etc in EPL2. You can download the manual PDF in here.
  9. I have used 2 type of Barcode Text and Barcode Code, below is general configurations:
  • Text
         Format : Ap1,p2,p3,p4,p5,p6,p7,”DATA”
         A = text

         p1 : Horizontal Start Position (X in dots)
         p2 : Vertical Start Position (X in dots)
         p3 : Rotate (0 = normal, 1 = 90 degrees, 2 = 180 degrees, 3 = 270 degrees)
         p4 : Font Type (1 until 5 = Fixed Pitch, 8 and 9 = Asian Language)
         p5 : Horizontal Multiplier (Accepted Value : 1-6,8)
         p6 : Vertical multiplier(Accepted Value : 1-9)
         p7 : Reverse Image (N = Normal, R = reverse)
        Data : backslash (\) characters designates the following character is a literal and will encode into data field. For Example: code= \"Test\", Printed = "Test"

        Working Example = A50,0,0,1,1,1,N,"Example 1", A50,300,0,3,2,2,R,"Example 6"↵

  • Barcode 
         1 : Horizontal Start Position (X in dots)
         2 : Vertical Start Position (X in dots)
         3 : Rotate(0 = normal, 1 = 90 degrees, 2 = 180 degrees, 3 = 270 degrees)
         4 : Barcode Type Selection (See Image Below)

         5 : Narrow Bar (See Image in Barcode Type)
         6 : Wide Bar (See Image in Barcode Type)
         7 : Barcode Height(X in dots)
         8 : Print Human Readable (B = yes, N = No)
         9 : Data:backslash (\) characters designates the following character is a literal and will encode into  data field. For Example: code= \"Test\", Printed = "Test"

        Working Example : 
  • B10,10,0,PL,5,5,5,N,"12-34567-890123".
  • B10,10,0,3,3,7,200,B,"998152-001"



Share: