<< Click to Display Table of Contents >> RenderPDF417 |
[Professional Edition and above only]
Computes the dimensions of a PDF417 barcode.
method void VPE.RenderPDF417(
string Text,
VpeCoord nWidth,
VpeCoord nHeight,
VpeCoord nModuleWidth
)
string Text
the text of the barcode
VpeCoord nWidth, nHeight
With these two parameters you can specify a maximum size the barcode can have.
The following rules apply:
•nWidth and nHeight is specified: in this case the maximum rectangle of the barcode will be computed, which will fit into the given rectangle.
•Only nWidth is specified, nHeight is zero: In this case nHeight is computed (nWidth is also computed, i.e. adjusted).
•Only nHeight is specified, nWidth is zero: In this case nWidth is computed (nHeight is also computed, i.e. adjusted).
•nWidth and nHeight are zero: in this case the smallest possible rectangle is computed
VpeCoord nModuleWidth
If this parameter is zero, VPE will choose itself an optimum barcode module width. If it is non-zero, you can specify the width of a barcode module.
Example:
szStr =
"01\t05\t{)>\t82\tWSP3.5.1DE\r"
"02\t23112001\t1Z32630V6851146547\t08\tM\t9838571153\t3"
"\t1.5\tKgs\t1.5\t\tP/P\t0.00\t\t\t\t\tDE\t\t\t\r"
"04\tSH\tX-LOGISTIK GMBH\tWALLENHORST\t\t49134\tDE\t32630V"
"\tC/O INTERTRADE AG\t\t\t\tHERR ERNST LEMKE\t+495407-834343\t"
"\tAM OHLENBERG 14\t\r"
"04\tST\tIDEAL SOFTWARE GMBH\tNEUSS\t\t41464\tDE\t"
"\tERFTSTR. 102A\t\t\t\tMR. XXX\t\t\t\t\r"
"99\r";
// Compute the smallest possible rectangle for a given textDoc.RenderPDF417(szStr, 0, 0, 0)
xsize = Doc.nRenderWidth
ysize = Doc.nRenderHeight
// Insert the barcode into the document
Doc.PDF417(1, 1, -xsize, -ysize, szStr)
Remarks:
sets LastError
"Barcodes (2D)" in the Programmer's Manual