Table of Contents

Class BarCode

Namespace
PdfSharp.Drawing.BarCodes
Assembly
PdfSharp.dll

Represents the base class of all bar codes.

public abstract class BarCode : CodeBase
Inheritance
BarCode
Derived
Inherited Members

Constructors

BarCode(string, XSize, CodeDirection)

Initializes a new instance of the BarCode class.

protected BarCode(string text, XSize size, CodeDirection direction)

Parameters

text string
size XSize
direction CodeDirection

Properties

DataLength

Gets or sets the length of the data that defines the bar code.

public int DataLength { get; set; }

Property Value

int

EndChar

Gets or sets the optional end character.

public char EndChar { get; set; }

Property Value

char

StartChar

Gets or sets the optional start character.

public char StartChar { get; set; }

Property Value

char

TextLocation

Gets or sets the location of the text next to the bar code.

public TextLocation TextLocation { get; set; }

Property Value

TextLocation

TurboBit

Gets or sets a value indicating whether the turbo bit is to be drawn. (A turbo bit is something special to Kern (computer output processing) company (as far as I know))

public virtual bool TurboBit { get; set; }

Property Value

bool

WideNarrowRatio

When overridden in a derived class gets or sets the wide narrow ratio.

public virtual double WideNarrowRatio { get; set; }

Property Value

double

Methods

FromType(CodeType)

Creates a bar code from the specified code type.

public static BarCode FromType(CodeType type)

Parameters

type CodeType

Returns

BarCode

FromType(CodeType, string)

Creates a bar code from the specified code type.

public static BarCode FromType(CodeType type, string text)

Parameters

type CodeType
text string

Returns

BarCode

FromType(CodeType, string, XSize)

Creates a bar code from the specified code type.

public static BarCode FromType(CodeType type, string text, XSize size)

Parameters

type CodeType
text string
size XSize

Returns

BarCode

FromType(CodeType, string, XSize, CodeDirection)

Creates a bar code from the specified code type.

public static BarCode FromType(CodeType type, string text, XSize size, CodeDirection direction)

Parameters

type CodeType
text string
size XSize
direction CodeDirection

Returns

BarCode

Render(XGraphics, XBrush, XFont?, XPoint)

When defined in a derived class renders the code.

protected abstract void Render(XGraphics gfx, XBrush brush, XFont? font, XPoint position)

Parameters

gfx XGraphics
brush XBrush
font XFont
position XPoint