Does anybody know how could I print barcodes with qt? Or Is there any example for this?
Does anybody know how could I print barcodes with qt? Or Is there any example for this?
Thank you, but is there any example who did this before? Where could I find a free font?
Come on, that's not that difficult!
Qt Code:
bound.moveTo(0,0); pix.fill(Qt::white); p.setFont(font); p.drawText(bound, Qt::AlignCenter, text); p.end();To copy to clipboard, switch view to plain text mode
Google -> barcode font free : Code 39Where could I find a free font?
The answer would depend on what barcode you need to use. As far as I know Code 39 is simple enough as it has a 1:1 relationship from character to glyph. On the other hand EAN-13/UPC which is used in commerce has a complex relationship where the final glyph depends on the original character, its position in the string, its parity and the phase of the moon.
As it happens, I have just finished a first attempt at printing EAN-13 barcodes to a laser printer and had success both reading and scanning the results.
If you are interested I can send you a copy of the class - it works but it could probably be improved. Also, the moon-phase bit is not yet implemented![]()
yes, we do need a new wiki entry..hasnt been any new one for a LONG time..plus it would be interesting to know how u maintained EAN-13/UPC, cuz it sounds hard
ok, I'll attempt a wiki then repost here when done.
For all interested parties the article is up on the wiki under examples.
I would appreciate proof-reading and comments
Cheers all
aekilic (14th May 2009), Lykurg (14th May 2009), talk2amulya (14th May 2009)
great article! well documented, very informative..superb job..thanks gwyn
Thanks for the article, I just have added a function to change the barcode after the instance was created.
Bookmarks