trichview.com

trichview.support




Re: Barcode - newbie question


Return to index


Author

Message

Sergey Tkachenko

Posted: 05/04/2004 13:55:18


Do you use a thirdparty component displaying barcode?

You can insert it in TRichView

(see Demos\Delphi\tutorials for creating documents with components in TRichView,

or

Demos\Delphi\Editors\Editor 1\ for insertion in editor)


I do not know how your barcode component works, so I am not sure if it will

be printed automatically. If not, you need to process TRVPrint.OnPrintComponent

event. In this event, create a bitmap with the image of this component. To

provide a higher quality of printing, this bitmap can be larger than the

component (it will be printed stretched).

Another possibility - to create a special item type for your barcode component

and override printing method to draw it directly on the printer canvas. Example

how to do it (with TChart) is in Demos\Addins\ChartItem\. But all this is

required only if you are not satisfied with the default printing.


Or may be you do not need to insert a barcode in your document, but need

to print it at the specific location on paper?

It must be done differently (using OnPagePrepaint or OnPagePostpaint events

of TRVPrint).


>How do I add barcode print preview and printing support to my application

>?

>Since I currently can add it to my form I suppose I can just add it to my

>TRichview component or ?





Powered by ABC Amber Outlook Express Converter