Table of Contents

Class Code128

Namespace
PdfSharp.Drawing.BarCodes
Assembly
PdfSharp.BarCodes.dll

A Code 128 bar code (ISO/IEC 15417) for ASCII text. The code sets A, B and C are chosen so the code is as short as possible; runs of digits use code set C, two digits per character.

public class Code128 : BarCode
Inheritance
object
Code128
Inherited Members

Remarks

Size is the size of the bars without quiet zones; leave a light margin of at least 10 bar widths on both sides.

For GS1-128, put Fnc1 first and between variable-length element strings, for example Code128.Fnc1 + "0109501101530003" + "17140704" + "10AB-123".

Constructors

Code128(string)

Initializes a new Code 128 bar code. Set Size before drawing it.

Code128(string, XSize)

Initializes a new Code 128 bar code with the size of its bars.

Code128(string, XSize, CodeDirection)

Initializes a new Code 128 bar code with the size of its bars and its direction.

Fields

Fnc1

The character that stands for the FNC1 function character: U+E0F1, from the Private Use Area, so no letter of real text turns into FNC1 by accident.

Methods

CheckCode(string)

Checks that the code holds only ASCII characters and FNC1.

GetModules()

The modules of the code from the start to the stop character, true for bar, without quiet zones. Each symbol character is 11 modules wide, the stop character 13.

GetSymbolValues()

The symbol characters of the code: the start character, the data and the check character, not the stop character.

Render(XGraphics, XBrush, XFont?, XPoint)

Renders the bar code.