iText 7 7.1.9 API
iText.Barcodes.Barcode2D Class Referenceabstract
Inheritance diagram for iText.Barcodes.Barcode2D:
iText.Barcodes.BarcodeDataMatrix iText.Barcodes.BarcodePDF417 iText.Barcodes.BarcodeQRCode

Public Member Functions

abstract Rectangle  GetBarcodeSize ()
  Gets the maximum area that the barcode and the text, if any, will occupy. More...
 
abstract Rectangle  PlaceBarcode (PdfCanvas canvas, Color foreground)
  Places the barcode in a PdfCanvas. More...
 
virtual PdfFormXObject  CreateFormXObject (PdfDocument document)
  Creates a PdfFormXObject with the barcode. More...
 
abstract PdfFormXObject  CreateFormXObject (Color foreground, PdfDocument document)
  Creates a PdfFormXObject with the barcode. More...
 

Member Function Documentation

◆ CreateFormXObject() [1/2]

abstract PdfFormXObject iText.Barcodes.Barcode2D.CreateFormXObject ( Color  foreground,
PdfDocument  document 
)
pure virtual

Creates a PdfFormXObject with the barcode.

Parameters
foreground The color of the pixels. It can be null
document The document
Returns
the XObject.

Implemented in iText.Barcodes.BarcodePDF417, iText.Barcodes.BarcodeDataMatrix, and iText.Barcodes.BarcodeQRCode.

◆ CreateFormXObject() [2/2]

virtual PdfFormXObject iText.Barcodes.Barcode2D.CreateFormXObject ( PdfDocument  document )
inlinevirtual

Creates a PdfFormXObject with the barcode.

Creates a PdfFormXObject with the barcode. Default foreground color will be used.

Parameters
document The document
Returns
the XObject.

◆ GetBarcodeSize()

abstract Rectangle iText.Barcodes.Barcode2D.GetBarcodeSize ( )
pure virtual

Gets the maximum area that the barcode and the text, if any, will occupy.

Gets the maximum area that the barcode and the text, if any, will occupy. The lower left corner is always (0, 0).

Returns
the size the barcode occupies.

Implemented in iText.Barcodes.BarcodePDF417, iText.Barcodes.BarcodeDataMatrix, and iText.Barcodes.BarcodeQRCode.

◆ PlaceBarcode()

abstract Rectangle iText.Barcodes.Barcode2D.PlaceBarcode ( PdfCanvas  canvas,
Color  foreground 
)
pure virtual

Places the barcode in a PdfCanvas.

Places the barcode in a PdfCanvas. The barcode is always placed at coordinates (0, 0). Use the translation matrix to move it elsewhere.

Parameters
canvas the PdfCanvas where the barcode will be placed
foreground the foreground color. It can be null
Returns
the dimensions the barcode occupies

Implemented in iText.Barcodes.BarcodePDF417, iText.Barcodes.BarcodeDataMatrix, and iText.Barcodes.BarcodeQRCode.