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
stringthe language ("en" for english, for example)
country
stringthe country ("GB" for Great-Britain or "none" for no country, for example)
leftMin
intthe minimun number of letters before the hyphen
rightMin
intthe minimun number of letters after the hyphen
Fields
Hyphenator
The hyphenator engine.
protected Hyphenator Hyphenator
Field Value
Post
The second part of the hyphenated word.
protected string Post
Field Value
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
stringthe word to hyphenate
font
BaseFontthe font used by this word
fontSize
floatthe font size used by this word
remainingWidth
floatthe width available to fit this word in
Returns
- string
the first part of the hyphenated word including