Giter Site home page Giter Site logo

barcode-generator's Introduction

BarcodeGenerator

anuj barcoded

Author : Anuj Luthra

Barcode generator makes generating/displaying bar-codes for certain alphanumeric ids a piece of cake. It uses Gbarcode for encoding barcode data and then rmagick to generate images out of it for displaying in views.

This way we can generate any barcode type which Gbarcode -> Gnome Barcode project supports.

Ruby1.9 note

please use ruby1.9 compatible gbarcode at github repository by andreas . Good work mate.

USAGE:

its as simple as saying <%= barcode 'FJJ4JD'%>

This will generate a barcode for FJJ4JD in BARCODE_39 format with default width and height and include it in the view. the images are stored in /public/system/barcodes subdir.

Options Options Options:

To customize your barcodes, you can optionally pass following information in your views

  • encoding_format (Gbarcode constants for eg. Gbarcode::BARCODE_128 etc..)
  • width
  • height
  • scaling_factor
  • xoff
  • yoff
  • margin
  • no_ascii (accepts boolean true or false, prevents the ascii string from printing at the bottom of the barcode)

in this case your view will look like :

<%= barcode 'ANUJ', :height => 100, :width => 400, :margin => 100, :xoff => 20, :yoff => 40 %>

Installation:

install from git : script/install plugin git://github.com/anujluthra/barcode-generator.git

make sure that you install

  1. gem for gbarcode
  2. install native ImageMagick library

Supported Barcode Formats:

Gbarcode as of now allows us to generate barcodes in following formats: BARCODE_EAN BARCODE_UPC BARCODE_ISBN BARCODE_128B BARCODE_128C BARCODE_128 BARCODE_128RAW BARCODE_39 BARCODE_I25 BARCODE_CBR BARCODE_MSI BARCODE_PLS BARCODE_93 BARCODE_ANY BARCODE_NO_CHECKSUM

for more information on Gbarcode visit rubyforge home of gbarcode

barcode-generator's People

Contributors

anujluthra avatar stympy avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.