barcode-generator
barcode-generator copied to clipboard
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.
Maybe we can append image dimensions to the bar-code image.
This way we can generate images in different sizes, much similar to creating thumbnails for images.
What are your thoughts on this?
Anuj Director / Engineer http://www.36zeroes.com.au
That might work, I tried passing dimensions into the arguments, but as I mentioned it did not change the image once originally generated.
Dynamic resizing would make this awesome!
did you get this working Alan?
I didn't unfortunately
On Jun 24, 2012, at 8:13 PM, Anuj Luthra [email protected] wrote:
did you get this working Alan?
Reply to this email directly or view it on GitHub: https://github.com/anujluthra/barcode-generator/issues/7#issuecomment-6538080
can you please tel me which code should be written and where to be written . i am not geting any idea