Class PDF417
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
strstringthe 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
pagePagethe 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
altDescriptionstringthe 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
xfloatthe x coordinate of the top left corner of the barcode.
yfloatthe y coordinate of the top left corner of the barcode.
Returns
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
moduleLengthfloatthe module length of the barcode.
Returns
- PDF417
this PDF417 object.