Create a PDF file of a QR code.
Namespace: diQRcodeNetAssembly: diQRcodeNet (in diQRcodeNet.dll) Version: 4.0.0.26352 (4.0.0.1)
Syntaxpublic static int CreatePdf(
string outFile,
string inputStr,
int nPixelsPerModule = 0,
Ecc level = Ecc.M,
int nPageWidth = 0,
int nPageHeight = 0,
int nX = 0,
int nY = 0,
Options options = Options.Default
)
Public Shared Function CreatePdf (
outFile As String,
inputStr As String,
Optional nPixelsPerModule As Integer = 0,
Optional level As Ecc = Ecc.M,
Optional nPageWidth As Integer = 0,
Optional nPageHeight As Integer = 0,
Optional nX As Integer = 0,
Optional nY As Integer = 0,
Optional options As Options = Options.Default
) As Integer
Parameters
- outFile String
- Name of output PDF file to be created.
- inputStr String
- Text input to be encoded.
- nPixelsPerModule Int32 (Optional)
- Number of pixels per module (default = 2 ppm)
- level Ecc (Optional)
- Error correction code level (default = M)
- nPageWidth Int32 (Optional)
- Width of PDF page in pixels (default = 0 => set width to fit QRcode image).
- nPageHeight Int32 (Optional)
- Height of PDF page in pixels (default = 0 => set height to fit QRcode image).
- nX Int32 (Optional)
- X-coordinate in pixels of bottom-left of QRcode image (default = 0 => at left side).
- nY Int32 (Optional)
- Y-coordinate in pixels of bottom-left of QRcode image (default = 0 => at bottom).
- options Options (Optional)
- Option flags.
Return Value
Int32Zero on success, or a nonzero
error code.
Examplen = QRcode.CreatePdf("hello0.pdf", "Hello world!");
n = QRcode.CreatePdf("helloA4.pdf", "Hello world!", nPixelsPerModule: 6, nPageWidth: 595, nPageHeight: 842, nX: 230, nY: 380);
See Also