Reputation: 1019
All over the web I can find examples how to generate bar code images using php.
However I need function which will transform string into code128 value so that I can use it in OpenOffice and Word, format it using code128 font and get real bar code.
Although theoretically I could code it myself I believe there are already good and tested solutions.
More precisely: I need script which would turn: "3870639399632" into "ÍFf_}Ç_È2yÎ".
Upvotes: 2
Views: 22315
Reputation: 1
Use the composer package "hbgl/php-code-128-encoder". https://packagist.org/packages/hbgl/php-code-128-encoder
$encoded = Code128Encoder::encode('ABC123456DEF');
assert ($encoded === 'ÌABCÇ,BXÈDEFqÎ');
Upvotes: 0
Reputation: 6632
Try: http://barcode-coder.com/en/barcode-php-class-203.html
Or if you are using PEAR you can use http://pear.php.net/package/Image_Barcode2
And there is http://www.brandonchecketts.com/archives/quick-php-script-to-generate-a-barcode and also http://www.barcodebakery.com/en
Upvotes: 3