|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.lowagie.text.pdf.BarcodePDF417
Generates the 2D barcode PDF417. Supports dimensioning auto-sizing, fixed
and variable sizes, automatic and manual error levels, raw codeword input,
codeword size optimization and bitmap inversion. The output can
be a CCITT G4 Image or a raw bitmap.
| Field Summary | |
static int |
PDF417_AUTO_ERROR_LEVEL
The error level correction is set automatically according to ISO 15438 recommendations. |
static int |
PDF417_FIXED_COLUMNS
The size will be at least codeColumns
with a variable number of codeRows. |
static int |
PDF417_FIXED_RECTANGLE
The size of the barcode will be at least codeColumns*codeRows. |
static int |
PDF417_FIXED_ROWS
The size will be at least codeRows
with a variable number of codeColumns. |
static int |
PDF417_FORCE_BINARY
One single binary segment is used |
static int |
PDF417_INVERT_BITMAP
Inverts the output bits of the raw bitmap that is normally bit one for black. |
static int |
PDF417_USE_ASPECT_RATIO
Auto-size is made based on aspectRatio and yHeight. |
static int |
PDF417_USE_ERROR_LEVEL
The error level correction is set by the user. |
static int |
PDF417_USE_MACRO
Use Macro PDF417 Encoding |
static int |
PDF417_USE_RAW_CODEWORDS
No text interpretation is done and the content of codewords
is used directly. |
| Constructor Summary | |
BarcodePDF417()
Creates a new BarcodePDF417 with the default settings. |
|
| Method Summary | |
Image |
createAwtImage(Color foreground,
Color background)
Creates a java.awt.Image. |
float |
getAspectRatio()
Gets the barcode aspect ratio. |
int |
getBitColumns()
Gets the number of X pixels of outBits. |
int |
getCodeColumns()
Gets the number of barcode data columns. |
int |
getCodeRows()
Gets the number of Y pixels of outBits.
|
int[] |
getCodewords()
Gets the codeword array. |
int |
getErrorLevel()
Gets the error level correction used for the barcode. |
Image |
getImage()
Gets an Image with the barcode. |
int |
getLenCodewords()
Gets the length of the codewords. |
int |
getOptions()
Gets the options to generate the barcode. |
byte[] |
getOutBits()
Gets the raw image bits of the barcode. |
byte[] |
getText()
Gets the bytes that form the barcode. |
float |
getYHeight()
Gets the Y pixel height relative to X. |
void |
paintCode()
Paints the barcode. |
void |
setAspectRatio(float aspectRatio)
Sets the barcode aspect ratio. |
void |
setCodeColumns(int codeColumns)
Sets the number of barcode data columns. |
void |
setCodeRows(int codeRows)
Sets the number of barcode rows. |
void |
setDefaultParameters()
Set the default settings that correspond to PDF417_USE_ASPECT_RATIO
and PDF417_AUTO_ERROR_LEVEL. |
void |
setErrorLevel(int errorLevel)
Sets the error level correction for the barcode. |
void |
setLenCodewords(int lenCodewords)
Sets the length of the codewords. |
void |
setMacroFileId(String id)
Sets the File ID for macro PDF417 encoding |
void |
setMacroSegmentCount(int cnt)
Sets the segment count for macro PDF417 encoding |
void |
setMacroSegmentId(int id)
Sets the segment id for macro PDF417 encoding |
void |
setOptions(int options)
Sets the options to generate the barcode. |
void |
setText(byte[] text)
Sets the bytes that form the barcode. |
void |
setText(String s)
Sets the text that will form the barcode. |
void |
setYHeight(float yHeight)
Sets the Y pixel height relative to X. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int PDF417_USE_ASPECT_RATIO
aspectRatio and yHeight.
public static final int PDF417_FIXED_RECTANGLE
codeColumns*codeRows.
public static final int PDF417_FIXED_COLUMNS
codeColumns
with a variable number of codeRows.
public static final int PDF417_FIXED_ROWS
codeRows
with a variable number of codeColumns.
public static final int PDF417_AUTO_ERROR_LEVEL
public static final int PDF417_USE_ERROR_LEVEL
public static final int PDF417_FORCE_BINARY
public static final int PDF417_USE_RAW_CODEWORDS
text interpretation is done and the content of codewords
is used directly.
public static final int PDF417_INVERT_BITMAP
public static final int PDF417_USE_MACRO
setMacroFileId(String),
setMacroSegmentId(int),
setMacroSegmentCount(int),
Constant Field Values| Constructor Detail |
public BarcodePDF417()
BarcodePDF417 with the default settings.
| Method Detail |
public void setMacroSegmentId(int id)
id - the id (starting at 0)setMacroSegmentCount(int)public void setMacroSegmentCount(int cnt)
cnt - the number of macro segmentssetMacroSegmentId(int)public void setMacroFileId(String id)
id - the file idpublic void setDefaultParameters()
PDF417_USE_ASPECT_RATIO
and PDF417_AUTO_ERROR_LEVEL.
public void paintCode()
public Image getImage()
throws BadElementException
Image with the barcode. The image will have to be
scaled in the Y direction by yHeightfor the barcode
to have the right printing aspect.
Image
BadElementException - on error
public Image createAwtImage(Color foreground,
Color background)
java.awt.Image.
foreground - the color of the barsbackground - the color of the background
public byte[] getOutBits()
yHeight.
public int getBitColumns()
outBits.
outBitspublic int getCodeRows()
outBits.
It is also the number of rows in the barcode.
outBitspublic void setCodeRows(int codeRows)
codeRows - the number of barcode rowspublic int getCodeColumns()
public void setCodeColumns(int codeColumns)
codeColumns - the number of barcode data columnspublic int[] getCodewords()
PDF417_USE_RAW_CODEWORDS
is set.
public int getLenCodewords()
public void setLenCodewords(int lenCodewords)
lenCodewords - the length of the codewordspublic int getErrorLevel()
public void setErrorLevel(int errorLevel)
errorLevel - the error level correction for the barcodepublic byte[] getText()
public void setText(byte[] text)
text - the bytes that form the barcodepublic void setText(String s)
s - the text that will form the barcodepublic int getOptions()
public void setOptions(int options)
PDF417_* constants.
options - the options to generate the barcodepublic float getAspectRatio()
public void setAspectRatio(float aspectRatio)
aspectRatio - the barcode aspect ratiopublic float getYHeight()
public void setYHeight(float yHeight)
yHeight - the Y pixel height relative to X
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||