davidscotttufts / php-barcode

Source code for the article "How To Create Barcodes in PHP" found at http://davidscotttufts.com/2009/03/31/how-to-create-barcodes-in-php/
MIT License
321 stars 306 forks source link

Adjust Barcode Width Resolution #4

Open ericbarnes222 opened 9 years ago

ericbarnes222 commented 9 years ago

This is an awesome plugin that took no time to implement, and I'll be giving it a test later to see if it works as expected (in terms of the scanners reading the barcode properly, not so much the barcode itself not being correct).

I do have a question, though: Is there a way to change the width of the barcode?

I'm using this in an application developed to be used solely from a mobile phone. I have quite a high-resolution screen (1440px wide), but even for the 720px screen, it would be nice to widen it so that it remains clear and scanner-readable.

For the time being, I'm just resizing the image to fit 95% of the screen, but if there is a way to do it in code so it renders sharply, that'd be better.

Thanks!

MFlor commented 9 years ago

Hi, I forked his script and added a scaling functionality, so that you can upscale the printed barcode. Check it out at: https://github.com/MFlor/php-barcode