Git Product home page Git Product logo

Comments (8)

jamesprior avatar jamesprior commented on July 30, 2024

Thanks for the update, I think I saw that the string handling was different but I (clearly) haven't tested in 1.9.2. FYI I think that there are still some outstanding issues for some of the more complicated barcodes too, getting the rows and cols back correctly.

from pdf417.

meesterdude avatar meesterdude commented on July 30, 2024

I'm making an app that needs pdf417 barcodes, this (seems) cleaner overall but my next bet is barby but pdf417 in there requires it to be on jruby since it uses the java version. or something along those lines. oy...

well after much stumbling and poking i merely replaced it, rebuilt, and while installing got this:

pdf417.c: In function ‘refreshStruct’:
pdf417.c:260: error: lvalue required as unary ‘&’ operand
pdf417.c:275: warning: assignment discards qualifiers from pointer target type
pdf417.c:277: warning: implicit conversion shortens 64-bit value into a 32-bit value
pdf417.c:278: error: lvalue required as unary ‘&’ operand
make: *** [pdf417.o] Error 1

which is where I go googlyeyed.

anyway, figured i'd offer my findings for what use they may have. Sorry I can't be of more assistance.

from pdf417.

jamesprior avatar jamesprior commented on July 30, 2024

Yeah, thanks for the debug log - FWIW there are postscript packages to do 2D barcodes, which with some futzing can get into an rtex template. I admit it comes with its own environment setup headaches, but that's what we've been using for PDF417 barcodes in PDF documents. Look for the pst-barcode latex package, the auto-pst-pdf package for getting it put together in one call, or pstricks for the postscript version. Note that if you do use rtex you'll need to patch it to pass in the --shell-escape processing parameter.

from pdf417.

meesterdude avatar meesterdude commented on July 30, 2024

Yeah I was looking into that was well, but I'm unsure it'll work out. Well, I was hoping to deploy this as a rails app on heroku but more and more it looks like i'll have to externalize the barcode aspect in some manner and query a url to return a image. Whatever.

Thank you for being so responsive and for the advice. if/when you make the gem 1.9 friendly, you've got yourself a tester.

from pdf417.

jamesprior avatar jamesprior commented on July 30, 2024

Okay, go ahead and give it another shot. I haven't installed RVM but I have changed how and when it goes back to the lib and gotten rid of the STR2CSTR call. Also, version 0.2.0 has a to_png method which chunky_png to make outputting a little easier.

from pdf417.

meesterdude avatar meesterdude commented on July 30, 2024

Yes, version 0.2.0 works in ruby 1.9.2.and works like a charm, at that!

also confirmed the to_png works ala the chunky_png gem and definitely a welcome addition, i couldn't get the to_blob to work for the life of me.

after setting the rows and cols properties before calling to_png, I was also able to properly decode it via an online decoder.

very awesome! very exciting to see this working.

i'm still learning about pdf417, but Is quiet zone and compact mode on the roadmap? from playing with online generators they all seem to have that, and they are both things I need, but i'm not sure how important they are overall to people who need pdf417 generation when compared to something like error correction or foreground/background colors. (if ANY of those things would matter to others, at that.)

thanks again for the update!

from pdf417.

jamesprior avatar jamesprior commented on July 30, 2024

Hooray! For quiet zone, if I'm reading that right it's just an extra margin around the barcode. Right now that's not set to much in the to_png output, but you can adjust it by passing in a hash w/ a value for margin, eg:

to_png(:margin => 100)

There is a defined minimum for the spec based off of the size of the other elements, I'm not sure if I'll try to calculate and enforce that or not. It feels like a bit of a waste since people can/will likely override that if they really want to snuggle it up to some other graphic.

For compact mode, I'm not sure. It looks like it is a matter of dropping the stop sequence and one codeword. The stop sequence would be easy enough to strip out, we know what that's supposed to look like but I haven't looked at what it would take to find the last codeword and drop it. So I suppose that's a long way of saying that there isn't much of a roadmap but that I don't think it is something that would be prohibitively complex.

FWIW there is an error_level setting that it will respect, if it's unset it will try to set it to the highest allowed for the rows and cols.

from pdf417.

meesterdude avatar meesterdude commented on July 30, 2024

ok, good to know about the quiet zone / margin. Not what i thought it was, but yes just extra margin around the barcode. not a big deal at all in hindsight.

yes compact mode is also aka truncated it seems, from barcodephp.com manual: "Cuts the barcode by removing the 2 last columns on the right. Your barcode will be smaller but harder to read." although i can't find anything more spec-like that backs that up. Guess I'll tinker in photoshop and see what happens via the decoder to better understand.

from pdf417.

Related Issues (7)

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.