THPDFPage.DirectDrawBarcode Method

Draws a linear barcode directly into the page content as filled rectangles, stretched to occupy the given box. Unlike DrawBarcode, it bypasses the canvas and derives 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-hand edge of the barcode in page coordinates
YTop edge of the barcode in page coordinates
WidthWidth of the bar pattern; quiet zones are excluded
HeightHeight of the bars; POSTNET's short bars occupy the lower 40 %
TextThe data 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. Any other value draws Code 39

Return value

Returns no value

Usage notes

Related APIs