HiraokaHyperTools.iTextSharp-LGPL  0.2.5
iTextSharp.text.pdf.BarcodeDatamatrix Class Reference

Classes

class  Placement
 
class  ReedSolomon
 

Public Member Functions

 BarcodeDatamatrix ()
 
int Generate (String text)
 
int Generate (byte[] text, int textOffset, int textSize)
 
Image CreateImage ()
 
virtual System.Drawing.Image CreateDrawingImage (System.Drawing.Color foreground, System.Drawing.Color background)
 

Static Public Attributes

const int DM_NO_ERROR = 0
 
const int DM_ERROR_TEXT_TOO_BIG = 1
 
const int DM_ERROR_INVALID_SQUARE = 3
 
const int DM_ERROR_EXTENSION = 5
 
const int DM_AUTO = 0
 
const int DM_ASCII = 1
 
const int DM_C40 = 2
 
const int DM_TEXT = 3
 
const int DM_B256 = 4
 
const int DM_X21 = 5
 
const int DM_EDIFACT = 6
 
const int DM_RAW = 7
 
const int DM_EXTENSION = 32
 
const int DM_TEST = 64
 

Properties

byte[] BitImage [get]
 
int Height [get, set]
 
int Width [get, set]
 
int Ws [get, set]
 
int Options [get, set]
 

Constructor & Destructor Documentation

◆ BarcodeDatamatrix()

iTextSharp.text.pdf.BarcodeDatamatrix.BarcodeDatamatrix ( )

Creates an instance of this class.

Member Function Documentation

◆ CreateDrawingImage()

virtual System.Drawing.Image iTextSharp.text.pdf.BarcodeDatamatrix.CreateDrawingImage ( System.Drawing.Color  foreground,
System.Drawing.Color  background 
)
virtual

Creates a java.awt.Image. A successful call to the method generate() before calling this method is required.

Parameters
foregroundthe color of the bars
backgroundthe color of the background
Returns
the image

◆ CreateImage()

Image iTextSharp.text.pdf.BarcodeDatamatrix.CreateImage ( )

Gets an Image with the barcode. A successful call to the method generate() before calling this method is required.

Returns
the barcode Image
Exceptions
BadElementExceptionon error

◆ Generate() [1/2]

int iTextSharp.text.pdf.BarcodeDatamatrix.Generate ( byte[]  text,
int  textOffset,
int  textSize 
)

Creates a barcode.

Parameters
textthe text
textOffsetthe offset to the start of the text
textSizethe text size
Returns
the status of the generation. It can be one of this values:

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.

◆ Generate() [2/2]

int iTextSharp.text.pdf.BarcodeDatamatrix.Generate ( String  text)

Creates a barcode. The String is interpreted with the ISO-8859-1 encoding

Parameters
textthe text
Returns
the status of the generation. It can be one of this values:

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.

Exceptions
java.io.UnsupportedEncodingExceptionon error

Member Data Documentation

◆ DM_ASCII

const int iTextSharp.text.pdf.BarcodeDatamatrix.DM_ASCII = 1
static

ASCII encodation.

◆ DM_AUTO

const int iTextSharp.text.pdf.BarcodeDatamatrix.DM_AUTO = 0
static

The best encodation will be used.

◆ DM_B256

const int iTextSharp.text.pdf.BarcodeDatamatrix.DM_B256 = 4
static

Binary encodation.

◆ DM_C40

const int iTextSharp.text.pdf.BarcodeDatamatrix.DM_C40 = 2
static

C40 encodation.

◆ DM_EDIFACT

const int iTextSharp.text.pdf.BarcodeDatamatrix.DM_EDIFACT = 6
static

EDIFACT encodation.

◆ DM_ERROR_EXTENSION

const int iTextSharp.text.pdf.BarcodeDatamatrix.DM_ERROR_EXTENSION = 5
static

An error while parsing an extension.

◆ DM_ERROR_INVALID_SQUARE

const int iTextSharp.text.pdf.BarcodeDatamatrix.DM_ERROR_INVALID_SQUARE = 3
static

The dimensions given for the symbol are illegal.

◆ DM_ERROR_TEXT_TOO_BIG

const int iTextSharp.text.pdf.BarcodeDatamatrix.DM_ERROR_TEXT_TOO_BIG = 1
static

The text is too big for the symbology capabilities.

◆ DM_EXTENSION

const int iTextSharp.text.pdf.BarcodeDatamatrix.DM_EXTENSION = 32
static

Allows extensions to be embedded at the start of the text.

◆ DM_NO_ERROR

const int iTextSharp.text.pdf.BarcodeDatamatrix.DM_NO_ERROR = 0
static

No error.

◆ DM_RAW

const int iTextSharp.text.pdf.BarcodeDatamatrix.DM_RAW = 7
static

No encodation needed. The bytes provided are already encoded.

◆ DM_TEST

const int iTextSharp.text.pdf.BarcodeDatamatrix.DM_TEST = 64
static

Doesn't generate the image but returns all the other information.

◆ DM_TEXT

const int iTextSharp.text.pdf.BarcodeDatamatrix.DM_TEXT = 3
static

TEXT encodation.

◆ DM_X21

const int iTextSharp.text.pdf.BarcodeDatamatrix.DM_X21 = 5
static

X21 encodation.

Property Documentation

◆ BitImage

byte [] iTextSharp.text.pdf.BarcodeDatamatrix.BitImage
get

Gets the generated image. The image is represented as a stream of bytes, each byte representing 8 pixels, 0 for white and 1 for black, with the high-order bit of each byte first. Each row is aligned at byte boundaries. The dimensions of the image are defined by height and width plus 2 * ws.

Returns
the generated image

◆ Height

int iTextSharp.text.pdf.BarcodeDatamatrix.Height
getset

Gets/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 (height, width):

10, 10
12, 12
8, 18
14, 14
8, 32
16, 16
12, 26
18, 18
20, 20
12, 36
22, 22
16, 36
24, 24
26, 26
16, 48
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

Parameters
heightthe height of the barcode

◆ Options

int iTextSharp.text.pdf.BarcodeDatamatrix.Options
getset

Gets/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_X21 - X21 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<p> One of:
DM_TEST - doesn't generate the image but returns all the other information.

Parameters
optionsthe barcode options

◆ Width

int iTextSharp.text.pdf.BarcodeDatamatrix.Width
getset

Gets/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 (height, width):

10, 10
12, 12
8, 18
14, 14
8, 32
16, 16
12, 26
18, 18
20, 20
12, 36
22, 22
16, 36
24, 24
26, 26
16, 48
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

Parameters
widththe width of the barcode

◆ Ws

int iTextSharp.text.pdf.BarcodeDatamatrix.Ws
getset

Gets/sets the whitespace border around the barcode.

Parameters
wsthe whitespace border around the barcode

The documentation for this class was generated from the following file: