<< Click to Display Table of Contents >> RenderQRCode |
[Professional Edition and above only]
Computes the dimensions of a QR Code barcode.
method void VPE.RenderQRCode(
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:
// Compute the smallest possible rectangle for a given text
Doc.RenderQRCode("Hello World", 0, 0, 0)
xsize = Doc.nRenderWidth
ysize = Doc.nRenderHeight
// Insert the barcode into the document
Doc.QRCode(1, 1, -xsize, -ysize, "Hello World")
Remarks:
sets LastError
"Barcodes (2D)" in the Programmer's Manual