THPDFPage.DirectDrawBarcode Method

Draws a linear barcode straight into the page content as filled rectangles, stretched to fill the given box. Unlike DrawBarcode, it does not go through a canvas and takes the barcode width from the Width argument rather than from a module size

Declaration

procedure DirectDrawBarcode(X, Y, Width, Height: Single; const Text: AnsiString; BarcodeType: Integer);

Unit

HPDFDoc

Parameters

NamePurpose
XLeft edge of the barcode in page coordinates
YTop edge of the barcode in page coordinates
WidthWidth of the bar pattern; the quiet zones are not included
HeightHeight of the bars. The short bars of POSTNET cover the lower 40 %
TextData to encode (see the usage notes)
BarcodeTypeThe ordinal of a THPDFBarcodeType value: 0 Interleaved 2 of 5, 1 Industrial 2 of 5, 2 Matrix 2 of 5, 3 Code 39, 4 Code 39 Extended, 5 to 7 Code 128 A, B and C, 8 Code 93, 9 Code 93 Extended, 10 MSI, 11 POSTNET, 12 Codabar, 13 EAN-8, 14 EAN-13, 15 UPC-A, 16 and 17 UPC-E (number system 0 and 1), 18 and 19 the two- and five-digit add-ons, 20 to 22 GS1-128 with code set A, B or C. Other values draw Code 39

Return value

This member does not return a value

Usage notes

Related APIs