Returns the actual horizontal width and vertical height of a rotated barcode symbol in millimeters. The barcode symbol is specified by the parameters of this method.
function PrintSize(var Width, Height, SymbolWidth, SymbolHeight: Single; Barcode: string; ShowQuietZone: Boolean; Module: Single; Angle: Single = 0; BarcodeWidth: Single = 0; BarcodeHeight: Single = 0; HDPI: Integer = 0; VDPI: Integer = 0): Integer; overload; virtual;
The method returns the actual horizontal width and vertical height of a rotated barcode symbol that is specified by parameters of this method, in millimeters.
Please use the method between the Printer.BeginDoc and Printer.EndDoc methods if the HDPI or VDPI parameter is set to 0.
Width: Single; Returns the horizontal width of the rotated barcode symbol in millimeters. The value is calculated based on the module size. You can use one of the Module, BarcodeWidth and BarcodeHeight parameters to specify the module size.
If the quiet zones are printed (please read the ShowQuietZone parameter section below about whether or not the quiet zones will be printed), they are included in the barcode symbol. See diagram (the quiet zones are printed in claSilver color in order to accentuate them):
For the TBarcodeFmx2D_Code16K barcode component, the leading quiet zone and the trailing quiet zone are included always, even if the ShowQuietZone parameter is set to false. See diagram (the quiet zones are printed in claSilver color in order to accentuate them):
Height: Single; Returns the vertical height of the rotated barcode symbol in millimeters. The value is calculated based on the module size. You can use one of the Module, BarcodeWidth and BarcodeHeight parameters to specify the module size.
If the quiet zones are printed (please read the ShowQuietZone parameter section below about whether or not the quiet zones will be printed), they are included in the barcode symbol. See diagram (the quiet zones are printed in claSilver color in order to accentuate them):
For the TBarcodeFmx2D_Code16K barcode component, the leading quiet zone and the trailing quiet zone are included always, even if the ShowQuietZone parameter is set to false. See diagram (the quiet zones are printed in claSilver color in order to accentuate them):
SymbolWidth: Single; Returns the distance between the leading and trailing of the rotated barcode symbol in millimeter. The value is calculated based on the module size. You can use one of the Module, BarcodeWidth and BarcodeHeight parameters to specify the module size.
If the quiet zones are printed (please read the ShowQuietZone parameter section below about whether or not the quiet zones will be printed), they are included in the barcode symbol. See diagram (the quiet zones are printed in claSilver color in order to accentuate them):
For the TBarcodeFmx2D_Code16K barcode component, the leading quiet zone and the trailing quiet zone are included always, even if the ShowQuietZone parameter is set to false. See diagram (the quiet zones are printed in claSilver color in order to accentuate them):
See also the "BarcodeWidth" property.
SymbolHeight: Single; Returns the distance between the top and bottom of the rotated barcode symbol in millimeter. The value is calculated based on the module size. You can use one of the Module, BarcodeWidth and BarcodeHeight parameters to specify the module size.
If the quiet zones are printed (please read the ShowQuietZone parameter section below about whether or not the quiet zones will be printed), they are included in the barcode symbol. See diagram (the quiet zones are printed in claSilver color in order to accentuate them):
See also the "BarcodeHeight" property.
Barcode: String; Specifies the barcode text. It is of type string, and it is in fact an UnicodeString. By default, the unicode string will be converted to an UTF-8 bytes sequence (the BOM isn't included), then be encoded into the barcode symbol. If you want to use other encoding scheme (for example the ANSI, UTF-16), please convert it in the OnEncode event handle, or use the PrintSize (Syntax 3) overloading method and specify the converted bytes sequence in its Data parameter. If you want to encode a block of binary (bytes) data, please use the PrintSize (Syntax 3) overloading method.
For the TBarcodeFmx2D_RSS14 and TBarcodeFmx2D_RSSLimited components, if the property AutoCheckDigit is set to true, the check digit doesn't need to be included in the parameter, otherwise the check digit can be specified by you in the parameter.
ShowQuietZone: Boolean; Specifies whether to include the leading quiet zone, trailing quiet zone, top quiet zone, and bottom quiet zone in the barcode symbol. If the parameter value is set to true, these quiet zones are included. Otherwise, they don't be included. You can use the LeadingQuietZone, TrailingQuietZone, TopQuietZone, and BottomQuietZone properties to specify the size of these quiet zones in modules. See diagram (the quiet zones are printed in claSilver color in order to accentuate them):
For the TBarcodeFmx2D_Code16K barcode component, leading quiet zone and trailing quiet zone will be included always, even if the ShowQuietZone parameter value is set to false. See diagram (the quiet zones are printed in claSilver color in order to accentuate them):
See also the "ShowQuietZone" property.
Module: Single; Specifies the module size in millimeters.
For the Matrix 2D barcode symbology (excluding the TBarcodeFmx2D_MaxiCode barcode symbology), the module is single cell (a suqare shape) used to encode one bit data. The parameter specifies the module width and height. See diagram:
For the TBarcodeFmx2D_MaxiCode barcode symbology, the module is single cell (a regular hexagonal shape) used to encode one bit data. The parameter specifies the horizonal width of a module. Also, it's the center to center horizontal distance between adjacent modules. See diagram:
For the Stacked 2D barcode symbology and Linear 1D barcode symbology, the module is the thinest bar (or space) in the barcode symbol. The parameter specifies the module width. See diagram:
If any one of the BarcodeWidth and BarcodeHeight parameters is provided and it isn't zero, the value of Module parameter will be ignored, the module size will be calculated based on the BarcodeWidth parameter value or the BarcodeHeight parmeter value. If both BarcodeWidth and BarcodeHeight parameters are provided and aren't zero, only the BarcodeWidth parameter value will be used to calculate the module size, the BarcodeHeight parameter value will be ignored.
See also the "Module" property.
Angle: Single; Specifies an angle in degrees to rotate the barcode symbol and its quiet zones (if they are printed, please read the ShowQuietZone parameter section above about whether or not the quiet zones will be printed) anticlockwise. It defaults to 0 if the parameter is not provided, meaning left to right horizontal direction. See diagram (the quiet zones are printed in claSilver color in order to accentuate them):
BarcodeWidth: Single, Specifies the barcode symbol width (the distance between the beginning and end of the barcode symbol), in millimeters. If the quiet zones are printed (please read the ShowQuietZone parameter section above about whether or not the quiet zones will be printed), the leading quiet zone and the trailing quiet zone are included in the barcode symbol. See diagram (the quiet zones are printed in claSilver color in order to accentuate them):
For the TBarcodeFmx2D_Code16K barcode component, the leading quiet zone and the trailing quiet zone are included always, even if the ShowQuietZone parameter section above is set to false. See diagram (the quiet zones are printed in claSilver color in order to accentuate them):
Note, if the parameter is provided and it isn't zero, the values of Module and BarcodeHeight parameters will be ignored, the module size will be calculated based on the BarcodeWidth parameter value. If both BarcodeHeight and BarcodeWidth parameters aren't provided or they are all zero, the barcode symbol width will be determined by the Module parameter value.
If both BarcodeWidth and BarcodeHeight parameters are provided and aren't zero, only the BarcodeWidth parameter value will be used to calculate the module size, the BarcodeHeight parameter value will be ignored.
See also the "BarcodeWidth" property.
BarcodeHeight: Single, Specifies the barcode symbol height (the distance between the top and bottom of the barcode symbol), in millimeters. If the quiet zones are printed (please read the ShowQuietZone parameter section above about whether or not the quiet zones will be printed), the top quiet zone and the bottom quiet zone are included in the barcode symbol. See diagram (the SpaceColor property is set to claSilver in order to accentuate the quiet zones):
Note, if the parameter is provided and it isn't zero, and the BarcodeWidth parameter isn't provided or it's zero, the value of Module parameter will be ignored, the module size will be calculated based on the BarcodeHeight parameter value. If both BarcodeHeight and BarcodeWidth parameters aren't provided or they are all zero, the barcode symbol height will be determined by the Module parameter value.
If both BarcodeWidth and BarcodeHeight parameters are provided and aren't zero, only the BarcodeWidth parameter value will be used to calculate the module size, the BarcodeHeight parameter value will be ignored.
See also the "BarcodeHeight" property.
HDPI: Integer, Specifies the horizontal resolution of printer in DPI (dots per inch).
It defaults to 0 if the HDPI is not provided, and the horizontal resolution will be obtained from your printer.
VDPI: Integer, Specifies the vertical resolution of printer in DPI (dots per inch).
It defaults to 0 if the VDPI is not provided, and the vertical resolution will be obtained from your printer.
This method can return one of these values (these consts are defined in the pfmxCore2D unit):
Verify_InvalidIndex_AfterBarcode (-4):
If you use the OnEncode event handle to encode the barcode text to a bytes sequence in your own encoding scheme, the Verify_InvalidIndex_AfterBarcode (-4) indicats that an invalid byte value is in the suffix codes of the bytes sequence.
Verify_InvalidIndex_BeforeBarcode (-3):
If you use the OnEncode event handle to encode the barcode text to a bytes sequence in your own encoding scheme, the Verify_InvalidIndex_BeforeBarcode (-3) indicats that an invalid byte value is in the prefix codes of the bytes sequence (for example the BOM).
Verify_InvalidLength (-2):
It indicates that the length of Barcode parameter value is invalid.
Verify_OK (-1):
It indicates the method succeeds.
Verify_InvalidIndex_Base (0), and greater than 0:
It indicates that an invalid character is in the barcode text, the return value is the position index of the invalid charactere. For 32-bit Windows, 64-bit Windows, and Mac OSX platform, the index 1 denotes that the first character is invalid character. For iOS and Android platform, the index 0 denotes that the first character is invalid character.