Class LinearBarcode
A one-dimensional barcode (Code 128, EAN, Code 39, ...): a sequence of bars and spaces.
public class LinearBarcode : Barcode
- Inheritance
-
LinearBarcode
- Derived
- Inherited Members
Properties
Font
Font of the human-readable text (default Helvetica).
public PdfFont Font { get; set; }
Property Value
FontSize
Font size of the human-readable text; default: proportional to the module width.
public double? FontSize { get; set; }
Property Value
HumanReadableText
The text printed below the bars.
public string HumanReadableText { get; }
Property Value
Modules
Bars (true) and spaces (false), one entry per module.
public IReadOnlyList<bool> Modules { get; }
Property Value
ShowText
Print the human-readable text below the bars (default true).
public bool ShowText { get; set; }
Property Value
TotalWidthModules
Total width in modules: the number of Modules plus the quiet zone on both sides.
public override int TotalWidthModules { get; }
Property Value
Methods
Draw(PdfCanvas, double, double, double, double)
Draws the bars stretched to the rectangle with the bottom-left corner (x, y);
the module width is width / TotalWidthModules. If ShowText is set,
the human-readable text is drawn at the bottom of the rectangle, below the bars.
public override void Draw(PdfCanvas canvas, double x, double y, double width, double height)
Parameters
ToString()
Returns the modules as text ('|' bar, ' ' space).
public override string ToString()