public class PDF417Bean extends AbstractBarcodeBean
| Modifier and Type | Field and Description |
|---|---|
protected static int |
DEFAULT_COLUMN_COUNT
The default column count for PDF417.
|
protected static int |
DEFAULT_ERROR_CORRECTION_LEVEL
The default error correction level for PDF417
|
protected static double |
DEFAULT_MODULE_WIDTH
The default module width for PDF417.
|
protected static int |
DEFAULT_X_TO_Y_FACTOR
The default wide factor for PDF417.
|
doQuietZone, fontName, fontSize, height, moduleWidth, msgPos, pattern, quietZone, quietZoneVertical| Constructor and Description |
|---|
PDF417Bean()
Create a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
BarcodeDimension |
calcDimensions(String msg)
Calculates the dimension of a barcode with the given message.
|
void |
generateBarcode(CanvasProvider canvas,
String msg)
Generates a barcode using the given Canvas to render the barcode to its
output format.
|
double |
getBarWidth(int width)
Returns the effective width of a bar with a given logical width.
|
int |
getColumns() |
String |
getEncoding()
Returns the message encoding.
|
int |
getErrorCorrectionLevel() |
int |
getMaxCols()
Gets the maxCols.
|
int |
getMaxRows()
Gets the maximum number of columns.
|
int |
getMinCols()
Gets the minimum number of columns.
|
int |
getMinRows()
Gets the minimum number of rows.
|
double |
getRowHeight()
Returns the height of the rows.
|
double |
getWidthToHeightRatio()
Gets the ratio of the barcode width to the height.
|
boolean |
isECIEnabled()
Indicates whether the generation of ECI sequences is enabled.
|
void |
setColumns(int cols)
Sets the number of data columns for the barcode.
|
void |
setECIEnabled(boolean value)
Controls whether ECI sequences are generated for the output encoding.
|
void |
setEncoding(String encoding)
Sets the message encoding.
|
void |
setErrorCorrectionLevel(int level)
Sets the error correction level for the barcode.
|
void |
setMaxCols(int maxCols)
Sets the maximum number of columns.
|
void |
setMaxRows(int maxRows)
Sets the maximum number of rows.
|
void |
setMinCols(int minCols)
Sets the minimum number of columns.
|
void |
setMinRows(int minRows)
Sets the minimum of rows.
|
void |
setRowHeight(double height)
Sets the height of the rows.
|
void |
setWidthToHeightRatio(double widthToHeightRatio)
Sets the ratio of the barcode width to the height.
|
doQuietZone, getBarHeight, getFontName, getFontSize, getHeight, getHumanReadableHeight, getModuleWidth, getMsgPosition, getPattern, getQuietZone, getVerticalQuietZone, hasFontDescender, hasQuietZone, setBarHeight, setFontName, setFontSize, setHeight, setModuleWidth, setMsgPosition, setPattern, setQuietZone, setVerticalQuietZoneprotected static final double DEFAULT_MODULE_WIDTH
protected static final int DEFAULT_X_TO_Y_FACTOR
protected static final int DEFAULT_COLUMN_COUNT
protected static final int DEFAULT_ERROR_CORRECTION_LEVEL
public void generateBarcode(CanvasProvider canvas, String msg)
AbstractBarcodeBeangenerateBarcode in interface BarcodeGeneratorgenerateBarcode in class AbstractBarcodeBeancanvas - CanvasProvider that the barcode is to be rendered on.msg - message to encodeBarcodeGenerator.generateBarcode(CanvasProvider, String)public BarcodeDimension calcDimensions(String msg)
AbstractBarcodeBeancalcDimensions in interface BarcodeGeneratorcalcDimensions in class AbstractBarcodeBeanmsg - message to use for calculation.BarcodeGenerator.calcDimensions(String)public double getBarWidth(int width)
AbstractBarcodeBeangetBarWidth in class AbstractBarcodeBeanwidth - the logical width (1=narrow, 2=wide)AbstractBarcodeBean.getBarWidth(int)public int getColumns()
public int getErrorCorrectionLevel()
public int getMaxCols()
public int getMaxRows()
public int getMinCols()
public int getMinRows()
public double getRowHeight()
public double getWidthToHeightRatio()
public String getEncoding()
public boolean isECIEnabled()
public void setColumns(int cols)
cols - the number of columnspublic void setErrorCorrectionLevel(int level)
level - the error correction level (a value between 0 and 8)public void setMaxCols(int maxCols)
maxCols - the maximum number of columns..public void setMaxRows(int maxRows)
maxRows - the maximum number of rows.public void setMinCols(int minCols)
minCols - The minimum number of columns.public void setMinRows(int minRows)
minRows - the minimum of rows to set.public void setRowHeight(double height)
height - the height of the rows (in mm)public void setWidthToHeightRatio(double widthToHeightRatio)
widthToHeightRatio - the ratio of the barcode width to the heightpublic void setEncoding(String encoding)
encoding - the message encodingpublic void setECIEnabled(boolean value)
value - true to enable the generation of ECI sequencesCopyright © 2003–2023. All rights reserved.