iText 8.0.5 API
|
PDF417 is a stacked linear barcode format used in a variety of applications such as transport, identification cards, and inventory management. More...
Classes |
|
class | Segment |
A container that encapsulates all data needed for a segment. More... |
|
class | SegmentList |
An utility class that encapsulates a list of segments. More... |
|
Public Member Functions |
|
BarcodePDF417 () | |
Creates a new BarcodePDF417 with the default settings. More... |
|
virtual void | SetMacroSegmentId (int id) |
Sets the segment id for macro PDF417 encoding More... |
|
virtual void | SetMacroSegmentCount (int cnt) |
Sets the segment count for macro PDF417 encoding More... |
|
virtual void | SetMacroFileId (String id) |
Sets the File ID for macro PDF417 encoding More... |
|
virtual void | SetDefaultParameters () |
Set the default settings that correspond to PDF417_USE_ASPECT_RATIO and PDF417_AUTO_ERROR_LEVEL . More... |
|
override Rectangle | GetBarcodeSize () |
Gets the maximum area that the barcode and the text, if any, will occupy. More... |
|
override Rectangle | PlaceBarcode (PdfCanvas canvas, Color foreground) |
Places the barcode in a PdfCanvas . More... |
|
virtual Rectangle | PlaceBarcode (PdfCanvas canvas, Color foreground, float moduleWidth, float moduleHeight) |
Places the barcode in a iText.Kernel.Pdf.Canvas.PdfCanvas. More... |
|
virtual void | PaintCode () |
Paints the barcode. More... |
|
override PdfFormXObject | CreateFormXObject (Color foreground, PdfDocument document) |
Creates a PdfFormXObject with the barcode. More... |
|
virtual PdfFormXObject | CreateFormXObject (Color foreground, float moduleWidth, float moduleHeight, PdfDocument document) |
Creates a PdfFormXObject with the barcode with given module width and module height. More... |
|
virtual byte[] | GetOutBits () |
Gets the raw image bits of the barcode. More... |
|
virtual int | GetBitColumns () |
Gets the number of X pixels of outBits . More... |
|
virtual int | GetCodeRows () |
Gets the number of Y pixels of outBits . More... |
|
virtual void | SetCodeRows (int codeRows) |
Sets the number of barcode rows. More... |
|
virtual int | GetCodeColumns () |
Gets the number of barcode data columns. More... |
|
virtual void | SetCodeColumns (int codeColumns) |
Sets the number of barcode data columns. More... |
|
virtual int[] | GetCodewords () |
Gets the codeword array. More... |
|
virtual int | GetLenCodewords () |
Gets the length of the codewords. More... |
|
virtual void | SetLenCodewords (int lenCodewords) |
Sets the length of the codewords. More... |
|
virtual int | GetErrorLevel () |
Gets the error level correction used for the barcode. More... |
|
virtual void | SetErrorLevel (int errorLevel) |
Sets the error level correction for the barcode. More... |
|
virtual byte[] | GetCode () |
Gets the bytes that form the barcode. More... |
|
virtual void | SetCode (byte[] code) |
Sets the bytes that form the barcode. More... |
|
virtual void | SetCode (String text) |
Sets the code that will form the barcode. More... |
|
virtual int | GetOptions () |
Gets the options to generate the barcode. More... |
|
virtual void | SetOptions (int options) |
Sets the options to generate the barcode. More... |
|
virtual float | GetAspectRatio () |
Gets the barcode aspect ratio. More... |
|
virtual void | SetAspectRatio (float aspectRatio) |
Sets the barcode aspect ratio. More... |
|
virtual float | GetYHeight () |
Gets the Y pixel height relative to X. More... |
|
virtual void | SetYHeight (float yHeight) |
Sets the Y pixel height relative to X. More... |
|
Public Member Functions inherited from iText.Barcodes.Barcode2D | |
virtual PdfFormXObject | CreateFormXObject (PdfDocument document) |
Creates a PdfFormXObject with the barcode. More... |
|
Static Public Attributes |
|
const int | PDF417_USE_ASPECT_RATIO = 0 |
Auto-size is made based on aspectRatio and yHeight . More... |
|
const int | PDF417_FIXED_RECTANGLE = 1 |
The size of the barcode will be at least codeColumns*codeRows . More... |
|
const int | PDF417_FIXED_COLUMNS = 2 |
The size will be at least codeColumns with a variable number of codeRows . More... |
|
const int | PDF417_FIXED_ROWS = 4 |
The size will be at least codeRows with a variable number of codeColumns . More... |
|
const int | PDF417_AUTO_ERROR_LEVEL = 0 |
The error level correction is set automatically according to ISO 15438 recommendations. More... |
|
const int | PDF417_USE_ERROR_LEVEL = 16 |
The error level correction is set by the user. More... |
|
const int | PDF417_FORCE_BINARY = 32 |
One single binary segment is used More... |
|
const int | PDF417_USE_RAW_CODEWORDS = 64 |
No text interpretation is done and the content of codewords is used directly. More... |
|
const int | PDF417_INVERT_BITMAP = 128 |
Inverts the output bits of the raw bitmap that is normally bit one for black. More... |
|
const int | PDF417_USE_MACRO = 256 |
Use Macro PDF417 Encoding More... |
|
Package Functions |
|
virtual void | OutCodeword17 (int codeword) |
Adds the code word to the correct code word to the 17th bit. More... |
|
virtual void | OutCodeword18 (int codeword) |
Adds the code word to the correct code word to the 18th bit. More... |
|
virtual void | OutCodeword (int codeword) |
Utility method that adds a codeword to the barcode. More... |
|
virtual void | OutStopPattern () |
Adds the stop pattern to the output. More... |
|
virtual void | OutStartPattern () |
Adds the start pattern to the output. More... |
|
virtual void | OutPaintCode () |
Adds the barcode to the output bits. More... |
|
virtual void | CalculateErrorCorrection (int dest) |
Calculates the error correction codewords. More... |
|
virtual void | TextCompaction (int start, int length) |
Compacts the codewords. More... |
|
virtual void | BasicNumberCompaction (int start, int length) |
Compacts the codewords. More... |
|
virtual int | GetTextTypeAndValue (int maxLength, int idx) |
Gets the text type and value. More... |
|
virtual bool | CheckSegmentType (BarcodePDF417.Segment segment, char type) |
Checks whether the segment is of a certain type. More... |
|
virtual int | GetSegmentLength (BarcodePDF417.Segment segment) |
Calculates the length of the given segment More... |
|
virtual void | NumberCompaction (int start, int length) |
Compacts the code words. More... |
|
virtual void | ByteCompaction6 (int start) |
Compacts the code words More... |
|
virtual void | Assemble () |
Assembles the data of the code words. More... |
|
virtual void | DumpList () |
Prints the segments to standard output. More... |
|
virtual int | GetMaxSquare () |
Calculates the max square that can contain the barcode. More... |
|
Static Package Functions |
|
static int | MaxPossibleErrorLevel (int remain) |
Calculates the highest error level that can be used for the remaining number of data codewords. More... |
|
Package Attributes |
|
int | bitPtr |
int | cwPtr |
BarcodePDF417.SegmentList | segmentList |
Static Package Attributes |
|
const int | START_PATTERN = 0x1fea8 |
const int | STOP_PATTERN = 0x3fa29 |
const int | START_CODE_SIZE = 17 |
const int | STOP_SIZE = 18 |
const int | MOD = 929 |
const int | ALPHA = 0x10000 |
const int | LOWER = 0x20000 |
const int | MIXED = 0x40000 |
const int | PUNCTUATION = 0x80000 |
const int | ISBYTE = 0x100000 |
const int | BYTESHIFT = 913 |
const int | PL = 25 |
const int | LL = 27 |
const int | AS = 27 |
const int | ML = 28 |
const int | AL = 28 |
const int | PS = 29 |
const int | PAL = 29 |
const int | SPACE = 26 |
const int | TEXT_MODE = 900 |
const int | BYTE_MODE_6 = 924 |
const int | BYTE_MODE = 901 |
const int | NUMERIC_MODE = 902 |
const int | ABSOLUTE_MAX_TEXT_SIZE = 5420 |
const int | MAX_DATA_CODEWORDS = 926 |
const int | MACRO_SEGMENT_ID = 928 |
const int | MACRO_LAST_SEGMENT = 922 |
const float | DEFAUL_MODULE_WIDTH = 1 |
const float | DEFAUL_MODULE_HEIGHT = 1 |
Static Package Attributes inherited from iText.Barcodes.Barcode2D | |
const float | DEFAULT_MODULE_SIZE = 1 |
PDF417 is a stacked linear barcode format used in a variety of applications such as transport, identification cards, and inventory management.
PDF417 is a stacked linear barcode format used in a variety of applications such as transport, identification cards, and inventory management. "PDF" stands for Portable Data File. The "417" signifies that each pattern in the code consists of 4 bars and spaces in a pattern that is 17 units (modules) long. It is defined in ISO 15438.
|
inline |
Creates a new BarcodePDF417
with the default settings.
|
inlinepackagevirtual |
Assembles the data of the code words.
|
inlinepackagevirtual |
Compacts the codewords.
start | the start position |
length | the length |
|
inlinepackagevirtual |
Compacts the code words
start | the start position |
|
inlinepackagevirtual |
Calculates the error correction codewords.
dest | length of the code words |
|
inlinepackagevirtual |
Checks whether the segment is of a certain type.
segment | the segment to check |
type | the type to check against |
|
inlinevirtual |
Creates a PdfFormXObject with the barcode with given module width and module height.
foreground | The color of the pixels. It can be null |
moduleWidth | The width of the pixels. |
moduleHeight | The height of the pixels. |
document | The document |
|
inlinevirtual |
Creates a PdfFormXObject with the barcode.
foreground | the color of the pixels. It can be null |
Implements iText.Barcodes.Barcode2D.
|
inlinepackagevirtual |
Prints the segments to standard output.
|
inlinevirtual |
Gets the barcode aspect ratio.
|
inlinevirtual |
Gets the maximum area that the barcode and the text, if any, will occupy.
Implements iText.Barcodes.Barcode2D.
|
inlinevirtual |
Gets the number of X pixels of outBits
.
outBits
|
inlinevirtual |
Gets the bytes that form the barcode.
Gets the bytes that form the barcode. This bytes should be interpreted in the codepage Cp437.
|
inlinevirtual |
Gets the number of barcode data columns.
|
inlinevirtual |
Gets the number of Y pixels of outBits
.
Gets the number of Y pixels of outBits
. It is also the number of rows in the barcode.
outBits
|
inlinevirtual |
Gets the codeword array.
Gets the codeword array. This array is always 928 elements long. It can be written to if the option PDF417_USE_RAW_CODEWORDS
is set.
|
inlinevirtual |
Gets the error level correction used for the barcode.
Gets the error level correction used for the barcode. It may different from the previously set value.
|
inlinevirtual |
Gets the length of the codewords.
|
inlinepackagevirtual |
Calculates the max square that can contain the barcode.
Calculates the max square that can contain the barcode. And sets the codeColumns and codeRows variables.
|
inlinevirtual |
Gets the options to generate the barcode.
|
inlinevirtual |
Gets the raw image bits of the barcode.
Gets the raw image bits of the barcode. The image will have to be scaled in the Y direction by yHeight
.
|
inlinepackagevirtual |
Calculates the length of the given segment
segment | the segment to check |
|
inlinepackagevirtual |
Gets the text type and value.
maxLength | the maximum length |
idx | the index |
|
inlinevirtual |
Gets the Y pixel height relative to X.
|
inlinestaticpackage |
Calculates the highest error level that can be used for the remaining number of data codewords.
remain | the number of data codewords |
|
inlinepackagevirtual |
Compacts the code words.
start | the start position |
length | the length |
|
inlinepackagevirtual |
Utility method that adds a codeword to the barcode.
codeword | the codeword to add |
|
inlinepackagevirtual |
Adds the code word to the correct code word to the 17th bit.
codeword | the code word |
|
inlinepackagevirtual |
Adds the code word to the correct code word to the 18th bit.
codeword | the code word |
|
inlinepackagevirtual |
Adds the barcode to the output bits.
|
inlinepackagevirtual |
Adds the start pattern to the output.
|
inlinepackagevirtual |
Adds the stop pattern to the output.
|
inlinevirtual |
Paints the barcode.
Paints the barcode. If no exception was thrown a valid barcode is available.
|
inlinevirtual |
Places the barcode in a PdfCanvas
.
Implements iText.Barcodes.Barcode2D.
|
inlinevirtual |
Places the barcode in a iText.Kernel.Pdf.Canvas.PdfCanvas.
canvas | the iText.Kernel.Pdf.Canvas.PdfCanvas where the barcode will be placed |
foreground | the iText.Kernel.Colors.Color of the bars of the barcode |
moduleWidth | the width of the thinnest bar |
moduleHeight | the height of the bars |
|
inlinevirtual |
Sets the barcode aspect ratio.
Sets the barcode aspect ratio. A ratio or 0.5 will make the barcode width twice as large as the height.
aspectRatio | the barcode aspect ratio |
|
inlinevirtual |
Sets the bytes that form the barcode.
Sets the bytes that form the barcode. This bytes should be interpreted in the codepage Cp437.
code | the bytes that form the barcode |
|
inlinevirtual |
Sets the code that will form the barcode.
Sets the code that will form the barcode. This text is converted to bytes using the encoding Cp437.
text | the text that will form the barcode |
|
inlinevirtual |
Sets the number of barcode data columns.
Sets the number of barcode data columns. This number may be changed to keep the barcode valid.
codeColumns | the number of barcode data columns |
|
inlinevirtual |
Sets the number of barcode rows.
Sets the number of barcode rows. This number may be changed to keep the barcode valid.
codeRows | the number of barcode rows |
|
inlinevirtual |
Set the default settings that correspond to PDF417_USE_ASPECT_RATIO
and PDF417_AUTO_ERROR_LEVEL
.
|
inlinevirtual |
Sets the error level correction for the barcode.
errorLevel | the error level correction for the barcode |
|
inlinevirtual |
Sets the length of the codewords.
lenCodewords | the length of the codewords |
|
inlinevirtual |
Sets the File ID for macro PDF417 encoding
id | the file id |
|
inlinevirtual |
Sets the segment count for macro PDF417 encoding
cnt | the number of macro segments |
|
inlinevirtual |
Sets the segment id for macro PDF417 encoding
id | the id (starting at 0) |
|
inlinevirtual |
Sets the options to generate the barcode.
Sets the options to generate the barcode. This can be all the PDF417_*
constants.
options | the options to generate the barcode |
|
inlinevirtual |
Sets the Y pixel height relative to X.
Sets the Y pixel height relative to X. It is usually 3.
yHeight | the Y pixel height relative to X |
|
inlinepackagevirtual |
Compacts the codewords.
start | the start position |
length | the length |
|
static |
The error level correction is set automatically according to ISO 15438 recommendations.
|
static |
The size will be at least codeColumns
with a variable number of codeRows
.
|
static |
The size of the barcode will be at least codeColumns*codeRows
.
|
static |
The size will be at least codeRows
with a variable number of codeColumns
.
|
static |
One single binary segment is used
|
static |
Inverts the output bits of the raw bitmap that is normally bit one for black.
Inverts the output bits of the raw bitmap that is normally bit one for black. It has only effect for the raw bitmap.
|
static |
Auto-size is made based on aspectRatio
and yHeight
.
|
static |
The error level correction is set by the user.
The error level correction is set by the user. It can be 0 to 8.
|
static |
Use Macro PDF417 Encoding
|
static |
No text
interpretation is done and the content of codewords
is used directly.