PDF .NET Library Documentation - PDF Technologies, Inc.
This function adds a linear barcode to the canvas.

Namespace:  PDFTech
Assembly:  PDFTechLib (in PDFTechLib.dll) Version: 1.0.0.0 (1.7.9.0)

Syntax

C#
public void Add1DBarcode(
	PDFBarcode1D Barcode,
	double X,
	double Y
)
Visual Basic (Declaration)
Public Sub Add1DBarcode ( _
	Barcode As PDFBarcode1D, _
	X As Double, _
	Y As Double _
)
Visual C++
public:
void Add1DBarcode(
	PDFBarcode1D^ Barcode, 
	double X, 
	double Y
)

Parameters

Barcode
Type: PDFTech.Barcodes.Barcode1D..::.PDFBarcode1D
X
Type: System..::.Double
Barcode X position
Y
Type: System..::.Double
Barcode Y position

Remarks

Using the Add1DBarcode method, you may add many different types of linear barcodes to the canvas.

Examples

The example below shows how a linear barcode can be added to a PDF document.
CopyC#
PDFDocument doc = new PDFDocument("barcode.pdf");
doc.AutoLaunch = true;
PDFTech.Barcodes.Barcode1D.Ean13 ean13 = new PDFTech.Barcodes.Barcode1D.Ean13("123456789012", UnitOfMeasure.Pixel);           
if (ean13.IsCodeValid())
{
    doc.CurrentPage.Body.Add1DBarcode(ean13, 130, 100);
}
if (!doc.Save())
    Console.WriteLine(doc.Error);

See Also