Table of Contents

Class PDF417

Namespace
PDFjet.NET
Assembly
PDFjet.dll

Used to create PDF417 2D barcodes.

The bars are drawn from the location set with SetLocation. ISO/IEC 15438 asks for a quiet zone of at least two modules (twice the module width) on all four sides of the symbol, so leave that much space around it; scanners reject symbols with less.

Please see Example_38.

public class PDF417 : IDrawable
Inheritance
PDF417
Implements
Inherited Members

Constructors

PDF417(string)

Constructor for 2D barcodes. The symbol has 18 columns and as many rows as the string needs, up to the 928 codewords a PDF417 symbol can hold: 864 data codewords, or about 1,300 characters of mixed text, with the error correction level 5 used here. The string is ASCII, and a control character other than HT, LF and CR takes a codeword of its own and one more, in byte compaction. Throws an exception if there are unencodable characters or the string does not fit in a symbol.

public PDF417(string str)

Parameters

str string

the specified string.

Methods

DrawOn(Page)

Draws this barcode on the specified page. The bars are black, and the pen of the page is as it was after it.

public float[] DrawOn(Page page)

Parameters

page Page

the page to draw on.

Returns

float[]

x and y coordinates of the bottom right corner of this component.

SetAltDescription(string)

Sets what the barcode says for a screen reader: a tagged document, PDF/UA or a PDF/A of level A, then has the barcode as a figure of that description. Without one, its bars are decoration, which a screen reader skips.

public PDF417 SetAltDescription(string altDescription)

Parameters

altDescription string

the description.

Returns

PDF417

this PDF417 object.

SetLocation(float, float)

Sets the location of this barcode on the page.

public PDF417 SetLocation(float x, float y)

Parameters

x float

the x coordinate of the top left corner of the barcode.

y float

the y coordinate of the top left corner of the barcode.

Returns

PDF417

SetModuleLength(float)

Sets the module length of this barcode, the width of its narrowest bar. This changes the barcode size while preserving the aspect. Use value between 0.5f and 0.75f. If the value is too small some scanners may have difficulty reading the barcode.

public PDF417 SetModuleLength(float moduleLength)

Parameters

moduleLength float

the module length of the barcode.

Returns

PDF417

this PDF417 object.