Git Product home page Git Product logo

pdf417's Issues

NULL-byte

Trying to create barcode with data:

data = ['08', 'FF', '00', '01', 'E2', '25', '01', '00', '00', '00', '00', '00', '00', 'CF', '21', '09', '2C', '16', 'E1', 'A0', '12', 'CE', '18', '00', '00']
barcode = PDF417.new([data.join].pack("H*"))

barcode stops with length of 4

if I delete '00' it will go thru

barcode = PDF417.new([data.delete_if { |x| x == '00' }.join].pack("H*"))

Is there any way to pass the data?

Merge gems?

Hi,

I'm the author of Barby [1], a wrapper for multiple barcode symbologies in Ruby. We're currently working on getting proper PDF417 support in place; currently, there's only a vendored Java version available. What I have in mind is to take out the Java bits, merge them with the C version and release this as a separate gem. We have some of it in place already [2], but I think it would be silly if there were two very similar gems for doing PDF417, and it seems you've already done a bit of work on this one..

So here's my question: Would you be open to a PR which merges in some Java bits along with the necessary scaffolding to make it work the same as the C version (AFAIK it's a port). I think it could be done quite cleanly. It would in reality become two gems, but AFAICT RubyGems handles this transparently so that it does not affect the end user, they get the version they're supposed to have. The (existing) wrapper class just requires the "lib" class as usual, which will be either C or Java.

[1] http://github.com/toretore/barby
[2] https://github.com/Keeguon/barby-pdf417

After updating to Ruby 2.7.7 and Bundler 2.4.2: LoadError: cannot load such file -- pdf417/pdf417

I started seeing this error: LoadError: cannot load such file -- pdf417/pdf417.

In case anyone else finds this, it was because ext/pdf417/extconf.rb contained create_makefile(extension_name) (which resolves to create_makefile('pdf417').) This now needs to be create_makefile('pdf417/pdf417') in order for require('pdf417/pdf417') to work properly.

I fixed this issue in our fork: https://github.com/DocSpring/pdf417

Segmentation fault on empty string

PDF417.new(text: '').to_blob would segfault. A simple fix may be just rasing error on empty string. I also look at other 2d barcode. It seems that QR Code is able to encode empty string. Not sure how PDF417 should handle this corner case.

Symbol not found: _STR2CSTR

running ruby 1.9.2 ala RVM, get this error. From the looks of it, it was removed in ruby 1.9 in favor of StringValuePtr i believe... frankly a level of programming still outside of my skillset (otherwise i'd happily fix myself!)

better documentation on how to use with prawn

Through some trial and error and clues left hanging in the interwebs, I only got it to work as follows by using to_png...

barcode = PDF417.new("my data to encode")
data = StringIO.new(barcode.to_png)
pdf.image(data)

Generate different barcode with the Gem

Hi there,

I using this Gem to generate PDF417 barcode png. It works as expected, though the output image is different from those generated by online barcode generators. Just wondering if there is any other variance to this barcode format or if there is anything I need to be aware of when setting up the option arguments. Thanks.

Here is an example generated by the gem and the code for it.
generated_with_gem
PDF417.new(barcode_text,aspect_ratio: 0.9).to_png(margin: 0, x_scale: 1, y_scale: 28)

And here is another example from the online generator with same data.
by_online_generator

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.