Page 1 of 1

Printing barcode

Posted: Tue Feb 14, 2006 1:06 pm
by ashtu
Hi,

I need print barcode in footer.

Is any alternatives for http://www.trichview.com/applications/labelworks.html to print barcodes?

can I just use bar code font?

place T*BarCode component? on TRichView and process PrintComponent event?

any other ways?

Posted: Tue Feb 14, 2006 9:48 pm
by Sergey Tkachenko
LabelWorks is a tool for end users, not for programmers.
Yes, you need a barcode component or a code which draws a barcode on the specified canvas. Sorry, I cannot suggest such components, never worked with them.

If you need barcode as an object in document, then yes, you need a component. Even if TRichView will be able to print it itself, processing OnPrintComponent may be useful (you can create larger temporal bitmap in this event for printing with higher quality).
Or create a special item type with the overriden printing method, drawing directly on printer canvas, without a temporal bitmaps (for example, see Demos\Addons\ChartItem\, it was implemented for TChart)

Another option, if you do not need an object but need just to print barcode at the specified location on page, use OnPagePrepaint/OnPagePostpaint events to draw barcode.

Posted: Wed Feb 15, 2006 7:55 am
by Rob
If you need simple barcodes, then there may be a font that can do the trick for you.

Font a free Code39 here for example:
http://www.idautomation.com/fonts/free/

Note that for most barcodes to work, you need to start and end the code with an asterisk (*)