barcode-generator icon indicating copy to clipboard operation
barcode-generator copied to clipboard

Barcode Images Not Regenerated Across Pages

Open ghost opened this issue 13 years ago • 5 comments

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.

ghost avatar Sep 22 '11 15:09 ghost

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

anujluthra avatar Oct 15 '11 10:10 anujluthra

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!

ghost avatar Oct 15 '11 13:10 ghost

did you get this working Alan?

anujluthra avatar Jun 25 '12 01:06 anujluthra

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

ghost avatar Jun 25 '12 02:06 ghost

can you please tel me which code should be written and where to be written . i am not geting any idea

sindhuk avatar Jul 03 '12 09:07 sindhuk