<< Click to Display Table of Contents >> VpeRenderPDF417 |
[Professional Edition and above only]
Computes the dimensions of a PDF417 barcode.
void VpeRenderPDF417(
VpeHandle hDoc,
LPCTSTR lpszText,
VpeCoord nWidth,
VpeCoord nHeight,
VpeCoord nModuleWidth
)
VpeHandle hDoc
Document Handle
LPCTSTR lpszText
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 text
VpeRenderPDF417(hDoc, szStr, 0, 0, 0)
xsize = VpeGet(hDoc, VRENDERWIDTH)
ysize = VpeGet(hDoc, VRENDERHEIGHT)
// Insert the barcode into the document
VpePDF417(hDoc, 1, 1, -xsize, -ysize, szStr)
Remarks:
sets LastError
"Barcodes (2D)" in the Programmer's Manual