How to print a barcode symbol to paper

Please use the Print method of the barcode component to print the barcode symbol to paper. The TImage control isn't required.

For example:

Printer.BeginDoc;

... { Print other content }

Font1 := TFont.Create;

try

Font1.Name := 'Comic Sans MS';

Font1.Size := 9;

Barcode_Code391.Print('1234567890', True, 2, 0.3, 20, 20, 15, clBlack, clWhite, dtBarcode, tpBottomOut, taJustify, Font1, 0.2, 0.2);

finally

Font1.Free;

end;

... { Print other content }

Printer.EndDoc;

or

Printer.BeginDoc;

... { Print other content }

with Barcode_Code391 do

begin

Radio := 2;

AutoCheckDigit := True;

BarColor := clBlack;

SpaceColor := clWhite;

DisplayText := dtBarcode;

TextPosition := tpBottomOut;

TextAlignment := taJustify;

TextFont.Name := 'Comic Sans MS';

TextFont.Size := 9;

Barcode := '1234567890';

Print(0.3, 20, 20, 15, 0.2, 0.2);

end;

... { Print other content }

Printer.EndDoc;

Contents