Results 1 to 3 of 3

Thread: Zint tutorial?

  1. #1

    Cool Zint tutorial?

    Does anyone have a tutorial for Zint? I thought I saw something about Zint being able to read qrcode besides being able to generate it. I've got a few qrcode .png's and I was hoping that Zint could read them.
    This version is just commandline.

    These are the options (and I don't know how to use them)
    Code:
    Zint version 2.4.0
    Encode input data in a barcode and save as a PNG, EPS or SVG file.
    
      -h, --help            Display this message.
      -t, --types           Display table of barcode types
      -i, --input=FILE      Read data from FILE.
      -o, --output=FILE     Write image to FILE. (default is out.png)
      -d, --data=DATA       Barcode content.
      -b, --barcode=NUMBER  Number of barcode type (default is 20 (=Code128)).
      --height=NUMBER       Height of symbol in multiples of x-dimension.
      -w, --whitesp=NUMBER  Width of whitespace in multiples of x-dimension.
      --border=NUMBER       Width of border in multiples of x-dimension.
      --box                 Add a box.
      --bind                Add boundary bars.
      -r, --reverse         Reverse colours (white on black).
      --fg=COLOUR           Specify a foreground colour.
      --bg=COLOUR           Specify a background colour.
      --scale=NUMBER        Adjust size of output image.
      --directpng           Send PNG output to stdout
      --directeps           Send EPS output to stdout
      --directsvg           Send SVG output to stdout
      --dump                Dump binary data to stdout
      --rotate=NUMBER       Rotate symbol (PNG output only).
      --cols=NUMBER         (PDF417) Number of columns.
      --vers=NUMBER         (QR Code) Version
      --secure=NUMBER       (PDF417 and QR Code) Error correction level.
      --primary=STRING      (Maxicode and Composite) Structured primary message.
      --mode=NUMBER         (Maxicode and Composite) Set encoding mode.
      --gs1                 Treat input as GS1 data
      --binary              Treat input as Binary data
      --notext              Remove human readable text
      --square              Force Data Matrix symbols to be square
    This what I tried:
    Code:
    zint -i comeseeJunebugartfestthisyear.png
    but this is what I got:
    error: error: Invalid character in input string (only Latin-1 characters supported)
    I also tried it with the entire path but came up with the same results.

    The pages that came up when I googled it were for the gui for Windows (I'm wishing that the Linux version had a gui too). That's no help.

    How would you tell Zint to read the .png file?

  2. #2
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    19,806
    Blog Entries
    14

    Default Re: Zint tutorial?

    You're trying to read a barcode from a png file. The syntax to create a barcodefile 1234.png from a string "1234" is
    Code:
    zint -o 1234.png -d"1234"
    If I do a "zint --help" I see no options about reading the barcode.

    To read barcodes, you might give gocr a try. If I do
    Code:
    gocr -i 1234.png
    on the 1234.png created with command above, it returns
    Code:
    _<barcode type="UPC_addon" chars="5" code="?????" error="-nan" />
    
    
    1234
    Hope this helps you through
    Last edited by Knurpht; 30-Jan-2012 at 15:50.
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    https://en.opensuse.org/openSUSE:Board#Members
    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  3. #3

    Default Re: Zint tutorial?

    What made me think I could write/read QR code with zint were these lines from the help:
    Code:
     -i, --input=FILE      Read data from FILE.
     --vers=NUMBER         (QR Code) Version
     --secure=NUMBER       (PDF417 and QR Code) Error correction level.
    I got a cnf when I tried that gocr -i 1234.png command. I guess I have to install gocr.
    I'm interested in the QR code part of Zint though.
    If this version of Zint can only do barcodes, why does it reference QR code in the help file? Also, when you go to this page: Zint Barcode Generator | Free software downloads at SourceForge.net the screenshots show it using (and reading) QR code. I see that at the bottom of the page, it says, "THIS PROJECT IS NO LONGER SUPPORTED. " That's too bad! It looks like it could potentially be a great piece of GUI type of software for Linux. If Windows can have such nice software, why can't Linux?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •