public abstract class Barcode2D extends Object
Modifier and Type | Field and Description |
---|---|
protected static float |
DEFAULT_MODULE_SIZE |
Constructor and Description |
---|
Barcode2D() |
Modifier and Type | Method and Description |
---|---|
abstract PdfFormXObject |
createFormXObject(Color foreground, PdfDocument document)
Creates a PdfFormXObject with the barcode.
|
PdfFormXObject |
createFormXObject(PdfDocument document)
Creates a PdfFormXObject with the barcode.
|
abstract Rectangle |
getBarcodeSize()
Gets the maximum area that the barcode and the text, if any, will occupy.
|
abstract Rectangle |
placeBarcode(PdfCanvas canvas, Color foreground)
Places the barcode in a PdfCanvas .
|
protected static final float DEFAULT_MODULE_SIZE
public abstract Rectangle getBarcodeSize()
public abstract Rectangle placeBarcode(PdfCanvas canvas, Color foreground)
PdfCanvas
. The barcode is always placed at coordinates (0, 0). Use the translation matrix to move it elsewhere.
canvas
- the PdfCanvas
where the barcode will be placed
foreground
- the foreground color. It can be null
public PdfFormXObject createFormXObject(PdfDocument document)
document
- The document
public abstract PdfFormXObject createFormXObject(Color foreground, PdfDocument document)
foreground
- The color of the pixels. It can be null
document
- The document
Copyright © 1998–2020 iText Group NV. All rights reserved.