Giter Site home page Giter Site logo

barcode-generator's People

Contributors

anujluthra avatar stympy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

barcode-generator's Issues

Enumerator method problem in ruby 1.9.2

Love how easy this make barcode creation but I have a problem displaying the barcode. I had some trouble getting everything installed but now I can generate an eps file just fine but it fails to create the png file and display the barcode in the view. I get this error:

ActionView::Template::Error (undefined method join' for #<Enumerator: []:collect>): 9: <%= @label.description %> 10: </p> 11: 12: <p><%= barcode @label.code %></p> 13: 14: <p> 15: <%= link_to "Edit", edit_label_path(@label) %> | app/views/labels/show.html.erb:12:in_app_views_labels_show_html_erb___1939771989001282335_2169264860_1747278781368551234'

When I run the tests, it points back to barcode_generator/lib/imagemagickwrapper.rb

system("convert #{options.collect.join(' ')} #{src} #{out}")

The error says Enumerable doesn't have a method 'join'.

When I run convert from the command line with no options, it creates the png file. When I remove options from the imagemagickwrapper.rb line, the barcode displays fine in the view.

I'm not well-versed in ruby innards so I'm not attempting a fix, just reporting.
I'm using ruby 1.9.2
rails 3.0.9
imagemagick 6.7.1-1
gbarcode for ruby 1.9

Thanks for any help,
Will Emerson

:cache option

It should be useful to have :cache option to allow disabling image caching. I'm using this plugin for the project, which requires dynamic adaptation of code image for different mobile devices, so default code image caching doesn't work for me.

specify barcode resolution

Most barcode printers print at 300dpi to allow for a decent quality that barcode readers need in case of small barcode labels.

Would it be possible to have a resolution option to specify the resolution for the generated barcodes?

Love the plug-in otherwise!

Cheers J.

Barcode Images Not Regenerated Across Pages

Hi Anuj,

This is a great plugin that I'm using for a project. I have run into an issue that a barcode image generated on one view will also be used for a second view where different parameters (width, height, etc) are passed but not utilized (it's the same larger image).

Looking at the code in /lib/barcode_generator.rb file I found this line:
unless File.exists?(out)

Which I commented out to allow the image to be regenerated each time, but this is not the case. It still operates as before. The first time the image is generated, it received the parameters according to the view page that was called first, and then used for all others.

Is there another way to get around this and have the image generated differently in different views?

Thanks,

Alan.

Resultant png image is blank

I am using rails 3.1 and ruby 1.9.2 while I am using the
<%= barcode("Text",:encoding_format=>Gbarcode::BARCODE_CBR) %>
Then it is creating a blank png image with name TEXT.png.

I am not getting any image ,while I am using this constant BARCODE_128 then it is creating.

But in the documentation it is said that these formats are supported now..?

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.