HiraokaHyperTools.iTextSharp-LGPL  0.2.5
iTextSharp.text.pdf.HyphenationAuto Class Reference
Inheritance diagram for iTextSharp.text.pdf.HyphenationAuto:
iTextSharp.text.pdf.IHyphenationEvent

Public Member Functions

 HyphenationAuto (string lang, string country, int leftMin, int rightMin)
 
string GetHyphenatedWordPre (string word, BaseFont font, float fontSize, float remainingWidth)
 

Protected Attributes

Hyphenator hyphenator
 
string post
 

Properties

string HyphenSymbol [get]
 
string HyphenatedWordPost [get]
 
- Properties inherited from iTextSharp.text.pdf.IHyphenationEvent
string HyphenSymbol [get]
 
string HyphenatedWordPost [get]
 

Detailed Description

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 (psoar.nosp@m.es@c.nosp@m.onsis.nosp@m.te.p.nosp@m.t)

Constructor & Destructor Documentation

◆ HyphenationAuto()

iTextSharp.text.pdf.HyphenationAuto.HyphenationAuto ( string  lang,
string  country,
int  leftMin,
int  rightMin 
)

Creates a new hyphenation instance usable in Chunk.

Parameters
langthe language ("en" for english, for example)
countrythe country ("GB" for Great-Britain or "none" for no country, for example)
leftMinthe minimun number of letters before the hyphen
rightMinthe minimun number of letters after the hyphen

Member Function Documentation

◆ GetHyphenatedWordPre()

string iTextSharp.text.pdf.HyphenationAuto.GetHyphenatedWordPre ( string  word,
BaseFont  font,
float  fontSize,
float  remainingWidth 
)

Hyphenates a word and returns the first part of it. To get the second part of the hyphenated word call getHyphenatedWordPost().

Parameters
wordthe word to hyphenate
fontthe font used by this word
fontSizethe font size used by this word
remainingWidththe width available to fit this word in
Returns
the first part of the hyphenated word including the hyphen symbol, if any

Implements iTextSharp.text.pdf.IHyphenationEvent.

Member Data Documentation

◆ hyphenator

Hyphenator iTextSharp.text.pdf.HyphenationAuto.hyphenator
protected

The hyphenator engine.

◆ post

string iTextSharp.text.pdf.HyphenationAuto.post
protected

The second part of the hyphenated word.

Property Documentation

◆ HyphenatedWordPost

string iTextSharp.text.pdf.HyphenationAuto.HyphenatedWordPost
get

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

Returns
the second part of the hyphenated word

◆ HyphenSymbol

string iTextSharp.text.pdf.HyphenationAuto.HyphenSymbol
get

Gets the hyphen symbol.

Returns
the hyphen symbol

The documentation for this class was generated from the following file: