Table of Contents

Class HyphenationAuto

Namespace
iTextSharp.text.pdf
Assembly
iTextSharp.LGPLv2.Core.dll

Hyphenates words automatically accordingly to the language and country. The hyphenator engine was taken from FOP and uses the TEX patterns. If a language is not provided and a TEX pattern for it exists, it can be easily adapted. @author Paulo Soares (psoares@consiste.pt)

public class HyphenationAuto : IHyphenationEvent
Inheritance
HyphenationAuto
Implements
Inherited Members

Constructors

HyphenationAuto(string, string, int, int)

Creates a new hyphenation instance usable in Chunk .

public HyphenationAuto(string lang, string country, int leftMin, int rightMin)

Parameters

lang string

the language ("en" for english, for example)

country string

the country ("GB" for Great-Britain or "none" for no country, for example)

leftMin int

the minimun number of letters before the hyphen

rightMin int

the minimun number of letters after the hyphen

Fields

Hyphenator

The hyphenator engine.

protected Hyphenator Hyphenator

Field Value

Hyphenator

Post

The second part of the hyphenated word.

protected string Post

Field Value

string

Properties

HyphenSymbol

Gets the hyphen symbol.

public string HyphenSymbol { get; }

Property Value

string

the hyphen symbol

HyphenatedWordPost

Gets the second part of the hyphenated word. Must be called after getHyphenatedWordPre() .

public string HyphenatedWordPost { get; }

Property Value

string

the second part of the hyphenated word

Methods

GetHyphenatedWordPre(string, BaseFont, float, float)

Hyphenates a word and returns the first part of it. To get the second part of the hyphenated word call getHyphenatedWordPost() . the hyphen symbol, if any

public string GetHyphenatedWordPre(string word, BaseFont font, float fontSize, float remainingWidth)

Parameters

word string

the word to hyphenate

font BaseFont

the font used by this word

fontSize float

the font size used by this word

remainingWidth float

the width available to fit this word in

Returns

string

the first part of the hyphenated word including