Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pdf417

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pdf417

  • 1.0.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

= pdf417

A wrapper for the pdf417lib C Library, from the README:

A library to generate the 2D barcode PDF417

Project: http://pdf417lib.sourceforge.net/
Creator: Paulo Soares (psoares@consiste.pt)
License: LGPL or MPL 1.1

This library generates a PDF417 image of the barcode in a 1x1 scale.
It requires that the displayed image be as least stretched 3 times
in the vertical direction in relation with the horizontal dimension.

Fetching the codewords only can be handy for using rtex and the pst-barcode package. If you're using prawn or RMagic the to_blob function should help generate a complete barcode.

Much of this was based off of reading through the Nokogiri and RMagic source code. Thanks!

== Usage

There are a few ways to use the library, at its simplest:

PDF417.encode_text("readable barcode data") => [12, 827, 120, 90, 41, 146, 30, 512, 423, 146, 90, 570]

If you want to get the raw barcode data from the PDF417 library:

barcode = PDF417.new("readable barcode data") barcode.to_blob # oops, wrong text barcode.text = "ACTUAL barcode data" barcode.to_blob

If you want to get it as an array of strings (each array element representing a line) barcode.encoding

If you have chunky_png installed and you'd rather have a PNG barcode.to_png

See the RDocs for more information.

== Note on Patches/Pull Requests

  • Fork the project.
  • Make your feature addition or bug fix.
  • Add tests for it. This is important so I don't break it in a future version unintentionally.
  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
  • Send me a pull request. Bonus points for topic branches.

== Copyright

Copyright (c) 2011 jamesprior. See LICENSE for details.

FAQs

Package last updated on 26 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc