iText 8.0.5 API
|
A Data Matrix is a two-dimensional bar code consisting of black and white "cells" or dots arranged in either a square or rectangular pattern, also known as a matrix. More...
Public Member Functions |
|
BarcodeDataMatrix () | |
Creates an instance of this class. More... |
|
BarcodeDataMatrix (String code) | |
Creates an instance of BarcodeDataMatrix More... |
|
BarcodeDataMatrix (String code, String encoding) | |
Creates an instance of BarcodeDataMatrix 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... |
|
override PdfFormXObject | CreateFormXObject (Color foreground, PdfDocument document) |
Creates a PdfFormXObject with the barcode. More... |
|
virtual PdfFormXObject | CreateFormXObject (Color foreground, float moduleSide, PdfDocument document) |
Creates a PdfFormXObject with the barcode with given module width and module height. More... |
|
virtual Rectangle | PlaceBarcode (PdfCanvas canvas, Color foreground, float moduleSide) |
Places the barcode in a PdfCanvas More... |
|
virtual Rectangle | GetBarcodeSize (float moduleHeight, float moduleWidth) |
Gets the barcode size More... |
|
virtual int | SetCode (String text) |
Creates a barcode. More... |
|
virtual int | SetCode (byte[] text, int textOffset, int textSize) |
Creates a barcode. More... |
|
virtual int | GetHeight () |
Gets the height of the barcode. More... |
|
virtual void | SetHeight (int height) |
Sets the height of the barcode. More... |
|
virtual int | GetWidth () |
Gets the width of the barcode. More... |
|
virtual void | SetWidth (int width) |
Sets the width of the barcode. More... |
|
virtual int | GetWs () |
Gets the whitespace border around the barcode. More... |
|
virtual void | SetWs (int ws) |
Sets the whitespace border around the barcode. More... |
|
virtual int | GetOptions () |
Gets the barcode options. More... |
|
virtual void | SetOptions (int options) |
Sets the options for the barcode generation. More... |
|
virtual void | SetEncoding (String encoding) |
setting encoding for data matrix code ( default encoding iso-8859-1) More... |
|
virtual String | GetEncoding () |
getting encoding for data matrix code 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 | DM_NO_ERROR = 0 |
No error. More... |
|
const int | DM_ERROR_TEXT_TOO_BIG = 1 |
The text is too big for the symbology capabilities. More... |
|
const int | DM_ERROR_INVALID_SQUARE = 3 |
The dimensions given for the symbol are illegal. More... |
|
const int | DM_ERROR_EXTENSION = 5 |
An error while parsing an extension. More... |
|
const int | DM_AUTO = 0 |
The best encodation will be used. More... |
|
const int | DM_ASCII = 1 |
ASCII encodation. More... |
|
const int | DM_C40 = 2 |
C40 encodation. More... |
|
const int | DM_TEXT = 3 |
TEXT encodation. More... |
|
const int | DM_B256 = 4 |
Binary encodation. More... |
|
const int | DM_X12 = 5 |
X12 encodation. More... |
|
const int | DM_EDIFACT = 6 |
EDIFACT encodation. More... |
|
const int | DM_RAW = 7 |
No encodation needed. More... |
|
const int | DM_EXTENSION = 32 |
Allows extensions to be embedded at the start of the text. More... |
|
const int | DM_TEST = 64 |
Doesn't generate the image but returns all the other information. More... |
|
const String | DEFAULT_DATA_MATRIX_ENCODING = "iso-8859-1" |
Additional Inherited Members |
|
Static Package Attributes inherited from iText.Barcodes.Barcode2D | |
const float | DEFAULT_MODULE_SIZE = 1 |
A Data Matrix is a two-dimensional bar code consisting of black and white "cells" or dots arranged in either a square or rectangular pattern, also known as a matrix.
A Data Matrix is a two-dimensional bar code consisting of black and white "cells" or dots arranged in either a square or rectangular pattern, also known as a matrix. The information to be encoded can be text or numeric data. Usual data size is from a few bytes up to 1556 bytes. The length of the encoded data depends on the number of cells in the matrix.
|
inline |
Creates an instance of this class.
|
inline |
Creates an instance of BarcodeDataMatrix
code | the code to generate. It should be noted that all characters will be encoded using the default encoding, ISO-8859-1 |
|
inline |
Creates an instance of BarcodeDataMatrix
code | the code to generate. |
encoding | the encoding to use when generating the barcode |
|
inlinevirtual |
Creates a PdfFormXObject with the barcode with given module width and module height.
foreground | The color of the pixels. It can be null |
moduleSide | The side (width and height) of the pixels. |
document | The document |
|
inlinevirtual |
Creates a PdfFormXObject with the barcode.
Implements iText.Barcodes.Barcode2D.
|
inlinevirtual |
Gets the maximum area that the barcode and the text, if any, will occupy.
Implements iText.Barcodes.Barcode2D.
|
inlinevirtual |
Gets the barcode size
moduleHeight | The height of the module |
moduleWidth | The width of the module |
|
inlinevirtual |
getting encoding for data matrix code
|
inlinevirtual |
Gets the height of the barcode.
Gets the height of the barcode. Will contain the real height used after a successful call to generate()
. This height doesn't include the whitespace border, if any.
|
inlinevirtual |
Gets the barcode options.
|
inlinevirtual |
Gets the width of the barcode.
Gets the width of the barcode. Will contain the real width used after a successful call to generate()
. This width doesn't include the whitespace border, if any.
|
inlinevirtual |
Gets the whitespace border around the barcode.
|
inlinevirtual |
Places the barcode in a PdfCanvas
.
Implements iText.Barcodes.Barcode2D.
|
inlinevirtual |
Places the barcode in a PdfCanvas
canvas | the canvas to place the barcode on |
foreground | The foreground color of the barcode |
moduleSide | The side (width and height) of the pixels. |
|
inlinevirtual |
Creates a barcode.
text | the text |
textOffset | the offset to the start of the text |
textSize | the text size |
DM_NO_ERROR
- no error.
DM_ERROR_TEXT_TOO_BIG
- the text is too big for the symbology capabilities.
DM_ERROR_INVALID_SQUARE
- the dimensions given for the symbol are illegal.
DM_ERROR_EXTENSION
- an error was while parsing an extension.
|
inlinevirtual |
Creates a barcode.
Creates a barcode. The String
is interpreted with the ISO-8859-1 encoding
text | the text |
DM_NO_ERROR
- no error.
DM_ERROR_TEXT_TOO_BIG
- the text is too big for the symbology capabilities.
DM_ERROR_INVALID_SQUARE
- the dimensions given for the symbol are illegal.
DM_ERROR_EXTENSION
- an error was while parsing an extension.
|
inlinevirtual |
setting encoding for data matrix code ( default encoding iso-8859-1)
encoding | encoding for data matrix code |
|
inlinevirtual |
Sets the height of the barcode.
Sets the height of the barcode. If the height is zero it will be calculated. This height doesn't include the whitespace border, if any. The allowed dimensions are (width, height):
10, 10
12, 12
18, 8
14, 14
32, 8
16, 16
26, 12
18, 18
20, 20
36, 12
22, 22
36, 16
24, 24
26, 26
48, 16
32, 32
36, 36
40, 40
44, 44
48, 48
52, 52
64, 64
72, 72
80, 80
88, 88
96, 96
104, 104
120, 120
132, 132
144, 144
height | the height of the barcode |
|
inlinevirtual |
Sets the options for the barcode generation.
Sets the options for the barcode generation. The options can be:
One of:
DM_AUTO
- the best encodation will be used
DM_ASCII
- ASCII encodation
DM_C40
- C40 encodation
DM_TEXT
- TEXT encodation
DM_B256
- binary encodation
DM_X12
- X12 encodation
DM_EDIFACT
- EDIFACT encodation
DM_RAW
- no encodation. The bytes provided are already encoded and will be added directly to the barcode, using padding if needed. It assumes that the encodation state is left at ASCII after the last byte.
One of:
DM_EXTENSION
- allows extensions to be embedded at the start of the text:
exxxxxx - ECI number xxxxxx
m5 - macro 5
m6 - macro 6
f - FNC1
saabbccccc - Structured Append, aa symbol position (1-16), bb total number of symbols (2-16), ccccc file identification (0-64515)
p - Reader programming
. - extension terminator
Example for a structured append, symbol 2 of 6, with FNC1 and ECI 000005. The actual text is "Hello".
s020600075fe000005.Hello
One of:
DM_TEST
- doesn't generate the image but returns all the other information.
options | the barcode options |
|
inlinevirtual |
Sets the width of the barcode.
Sets the width of the barcode. If the width is zero it will be calculated. This width doesn't include the whitespace border, if any. The allowed dimensions are (width, height):
10, 10
12, 12
18, 8
14, 14
32, 8
16, 16
26, 12
18, 18
20, 20
36, 12
22, 22
36, 16
24, 24
26, 26
48, 16
32, 32
36, 36
40, 40
44, 44
48, 48
52, 52
64, 64
72, 72
80, 80
88, 88
96, 96
104, 104
120, 120
132, 132
144, 144
width | the width of the barcode |
|
inlinevirtual |
Sets the whitespace border around the barcode.
ws | the whitespace border around the barcode |
|
static |
ASCII encodation.
|
static |
The best encodation will be used.
|
static |
Binary encodation.
|
static |
C40 encodation.
|
static |
EDIFACT encodation.
|
static |
An error while parsing an extension.
|
static |
The dimensions given for the symbol are illegal.
|
static |
The text is too big for the symbology capabilities.
|
static |
Allows extensions to be embedded at the start of the text.
|
static |
No error.
|
static |
No encodation needed.
No encodation needed. The bytes provided are already encoded.
|
static |
Doesn't generate the image but returns all the other information.
|
static |
TEXT encodation.
|
static |
X12 encodation.