milon / barcode

Laravel Barcode Generator
Other
1.33k stars 319 forks source link

adding option to print labels under the barcode #13

Closed wisosonic closed 8 years ago

wisosonic commented 8 years ago

Hi,

First I want to thank you for your code. It is really well developed and simple to understand. As many people ask for labels under the 1D barcode, I just added a parameter for the function "getBarcodeHTML" to choose or not to display labels :

public function getBarcodeHTML($code, $type, $w = 2, $h = 30, $color = 'black', $labels = false) { // .......... // }

Am only using EAN-13 barcodes, so I modified the function code to display labels in the right position. I dont have time to make all the changes with the other encoding protocols and functions (PNG, SVG..), so I decided to share my code with you !

You can find the modified file in attachements

Thank you a lot again for your code !

Wassim DNS1D_modified.txt

milon commented 8 years ago

@wisosonic thanks. Please do a PR with your code. I will merge that.