PDF .NET Library Documentation - PDF Technologies, Inc.
Assembly: PDFTechLib (in PDFTechLib.dll) Version: 1.0.0.0 (1.7.9.0)
This function adds a two dimensional barcode to the canvas.
Namespace:
PDFTechAssembly: PDFTechLib (in PDFTechLib.dll) Version: 1.0.0.0 (1.7.9.0)
Syntax
C# |
---|
public void Add2DBarcode( PDFBarcode2D barcode, double X, double Y ) |
Visual Basic (Declaration) |
---|
Public Sub Add2DBarcode ( _ barcode As PDFBarcode2D, _ X As Double, _ Y As Double _ ) |
Visual C++ |
---|
public: void Add2DBarcode( PDFBarcode2D^ barcode, double X, double Y ) |
Parameters
- barcode
- Type: PDFTech.Barcodes.Barcode2D..::.PDFBarcode2D
- X
- Type: System..::.Double
Barcode X position
- Y
- Type: System..::.Double
Barcode Y position
Remarks
Using the Add2DBarcode method, you may add many different types of two dimensionalbarcodes to the canvas.
Examples
The example below shows how a two dimensional barcode can be added to a PDF document.
CopyC#
PDFDocument doc = new PDFDocument("barcode.pdf"); doc.AutoLaunch = true; PDFTech.Barcodes.Barcode2D.DataMatrix dataMatrix = new PDFTech.Barcodes.Barcode2D.DataMatrix("123456789 PDFTech", UnitOfMeasure.Pixel); if (dataMatrix.IsCodeValid()) { doc.CurrentPage.Body.Add2DBarcode(dataMatrix, 130, 100); } if (!doc.Save()) Console.WriteLine(doc.Error);