Prints a barcode symbol to printer. The barcode symbol is specified in the properties of this barcode component. Pelase use the method between Printer.BeginDoc and Printer.EndDoc methods.
function Print(Left, Top, Module: Double; BarcodeWidth: Double = 0; BarcodeHeight: Double = 0; Angle: Integer = -1): Integer; overload; virtual;
Prints current barcode symbol that is specified in the properties of this barcode component to the printer.
Left: Double; Specifies the margin between the barcode symbol and the left side of the paper in millimeters. If the human readable text is represented, it's included in the barcode symbol.
For TBarcode1D_UPCA, TBarcode1D_UPCE, TBarcode1D_UPCE0, TBarcode1D_UPCE1, TBarcode1D_EAN2, TBarcode1D_EAN5, TBarcode1D_EAN8, and TBarcode1D_EAN13 barcode components, if the human readable text is represented, and the TextAlignment property is set to taCustom, the left and right quiet zones marks and their horizontal spacing are included in the barcode symbol too.
For TBarcode1D_ITF6, TBarcode1D_ITF14, and TBarcode1D_ITF16 barcode components, all bearer bars, the left and right spacing are included in the barcode symbol too.
If the human readable text is represented and it exceeds the barcode symbol in horizontal or vertical direction, the excess is included in the barcode symbol too.
See also the "LeftMargin" property.
Top: Double; Specifies the margin between the barcode symbol and the top side of the paper in millimeters. If the human readable text is represented, it's included in the barcode symbol.
For TBarcode1D_UPCA, TBarcode1D_UPCE, TBarcode1D_UPCE0, TBarcode1D_UPCE1, TBarcode1D_EAN2, TBarcode1D_EAN5, TBarcode1D_EAN8, and TBarcode1D_EAN13 barcode components, if the human readable text is represented, and the TextAlignment property is set to taCustom, the left and right quiet zones marks and their horizontal spacing are included in the barcode symbol too.
For TBarcode1D_ITF6, TBarcode1D_ITF14, and TBarcode1D_ITF16 barcode components, all bearer bars, the left and right spacing are included in the barcode symbol too.
If the human readable text is represented and it exceeds the barcode symbol in horizontal or vertical direction, the excess is included in the barcode symbol too.
See also the "TopMargin" property.
Module: Double; Specifies the module width in millimeters, it is the width of the smallest bar (or space) in the barcode symbol.
If the BarcodeWidth parameter is greater than zero, the value in the Module will be ignored, the module value will be calculated based on the BarcodeWidth parameter. If both Module and BarcodeWidth parameters are less than or equal to zero, the BarcodeHeight parameter must be set to greater than zero, the module value will be calculated based on the BarcodeHeight parameter and the Height property.
See also the "Module" property.
Angle: Integer; Specifies an angle in degrees to rotate the barcode symbol. It defaults to -1 if the Angle is not provided, and the barcode symbol will be rotated base on the value of the Orientation property:
If you want to use the -1 degrees, the 359 degrees can be used instead.
BarcodeWidth: Double, Specifies the barcode symbol width before rotation, in millimeters. If the human readable text is displayed and it exceeds the barcode symbol in horizontal direction, the excess isn't included in the width value.
For TBarcode1D_UPCA, TBarcode1D_UPCE, TBarcode1D_UPCE0, TBarcode1D_UPCE1, TBarcode1D_EAN2, TBarcode1D_EAN5, TBarcode1D_EAN8, and TBarcode1D_EAN13 barcode components, if the human readable text is displayed, and the TextAlignment property is set to taCustom, the width of quiet zone marks and their horizontal spacing (LeftQuietZoneSpacing and RightQuietZoneSpacing) are included.
For TBarcode1D_ITF6, TBarcode1D_ITF14, and TBarcode1D_ITF16 barcode components, width of left and right bearer bars (BearerWidth), left spacing, and right spacing are included too.
If the parameter is provided and isn't zero; the value in Module parameter will be ignored, the module width will be calculated based on the BarcodeWidth value. If the parameter isn't provided or it's set to zero, the Module parameter will be used.
See also the "BarcodeWidth" property.
BarcodeHeight: Integer; Specifies the distance between the top and bottom of the barcode symbol before rotation, in millimeters or modules. If the human readable text is displayed, the height of the human readable text and its vertical spacing (TextVSpacing) are included. If it exceeds the barcode symbol in vertical direction, the excess isn't included.
For TBarcode1D_ITF6, TBarcode1D_ITF14, and TBarcode1D_ITF16 barcode components, the height of top and bottom bearer bars are included too.
If the parameter isn't provided or it's set to zero, it will be calculated based on the values of Module parameter and the Height property.
If the parameter is provided and it is not set to zero, the value of Height property will be ignored. If it's greater than zero, it specifies the height in millimeters. If it's less than zero, the absolute value of the parameter specifies the height in modules.
Pelase use the method between Printer.BeginDoc and Printer.EndDoc methods. For example:
Printer.BeginDoc;
... { Print other content }
Barcode1D_Code391.Print(...); { Print the barcode }
... { Print other content }
Printer.EndDoc;
See diagram:
For Delphi 3, the method overload and default value of parameter aren't supported, so the method name is changed to Print1, and the parameters Module, BarcodeWidth, BarcodeHeight, and Angle are required.