C# Class iTextSharp.text.xml.ITextHandler

The iTextHandler-class maps several XHTML-tags to iText-objects.
Inheritance: ParserBase
Afficher le fichier Open project: red-gate/iTextSharp-4.1.6 Class Usage Examples

Protected Properties

Свойство Type Description
chapters int
controlOpenClose bool
currentChunk iTextSharp.text.Chunk
document IDocListener
ignore bool
myTags System.Collections.Hashtable
stack System.Collections.Stack

Méthodes publiques

Méthode Description
Characters ( string content, int start, int length ) : void

This method gets called when characters are encountered.

EndElement ( String uri, String lname, String name ) : void

This method gets called when an end tag is encountered.

HandleEndingTags ( String name ) : void

This method deals with the starting tags.

HandleStartingTags ( String name, Properties attributes ) : void

This method deals with the starting tags.

ITextHandler ( IDocListener document ) : System

Constructs a new iTextHandler that will translate all the events triggered by the parser to actions on the Document-object.

ITextHandler ( IDocListener document, Hashtable myTags ) : System
ITextHandler ( IDocListener document, HtmlTagMap myTags ) : System
ITextHandler ( IDocListener document, HtmlTagMap myTags, BaseFont bf ) : System
IgnorableWhitespace ( char ch, int start, int length ) : void

This method gets called when ignorable white space encountered.

SetControlOpenClose ( bool controlOpenClose ) : void

Sets the parameter that allows you to enable/disable the control over the Document.Open() and Document.Close() method.

If you set this parameter to true (= default), the parser will open the Document object when the start-root-tag is encountered and close it when the end-root-tag is met. If you set it to false, you have to open and close the Document object yourself.

StartElement ( String uri, String lname, String name, Hashtable attrs ) : void

This method gets called when a start tag is encountered.

Méthodes protégées

Méthode Description
AddImage ( Image img ) : void
IsDocumentRoot ( String tag ) : bool

Checks if a certain tag corresponds with the roottag.

Private Methods

Méthode Description
IsNewline ( String tag ) : bool

Checks if a certain tag corresponds with the newpage-tag.

IsNewpage ( String tag ) : bool

Checks if a certain tag corresponds with the newpage-tag.

Method Details

AddImage() protected méthode

protected AddImage ( Image img ) : void
img Image
Résultat void

Characters() public méthode

This method gets called when characters are encountered.
public Characters ( string content, int start, int length ) : void
content string an array of characters
start int the start position in the array
length int the number of characters to read from the array
Résultat void

EndElement() public méthode

This method gets called when an end tag is encountered.
public EndElement ( String uri, String lname, String name ) : void
uri String
lname String
name String the name of the tag that ends
Résultat void

HandleEndingTags() public méthode

This method deals with the starting tags.
public HandleEndingTags ( String name ) : void
name String the name of the tag
Résultat void

HandleStartingTags() public méthode

This method deals with the starting tags.
public HandleStartingTags ( String name, Properties attributes ) : void
name String the name of the tag
attributes System.util.Properties the list of attributes
Résultat void

ITextHandler() public méthode

Constructs a new iTextHandler that will translate all the events triggered by the parser to actions on the Document-object.
public ITextHandler ( IDocListener document ) : System
document IDocListener this is the document on which events must be triggered
Résultat System

ITextHandler() public méthode

public ITextHandler ( IDocListener document, Hashtable myTags ) : System
document IDocListener
myTags System.Collections.Hashtable
Résultat System

ITextHandler() public méthode

public ITextHandler ( IDocListener document, HtmlTagMap myTags ) : System
document IDocListener
myTags iTextSharp.text.html.HtmlTagMap
Résultat System

ITextHandler() public méthode

public ITextHandler ( IDocListener document, HtmlTagMap myTags, BaseFont bf ) : System
document IDocListener
myTags iTextSharp.text.html.HtmlTagMap
bf iTextSharp.text.pdf.BaseFont
Résultat System

IgnorableWhitespace() public méthode

This method gets called when ignorable white space encountered.
public IgnorableWhitespace ( char ch, int start, int length ) : void
ch char an array of characters
start int the start position in the array
length int the number of characters to read from the array
Résultat void

IsDocumentRoot() protected méthode

Checks if a certain tag corresponds with the roottag.
protected IsDocumentRoot ( String tag ) : bool
tag String a presumed tagname
Résultat bool

SetControlOpenClose() public méthode

Sets the parameter that allows you to enable/disable the control over the Document.Open() and Document.Close() method.
If you set this parameter to true (= default), the parser will open the Document object when the start-root-tag is encountered and close it when the end-root-tag is met. If you set it to false, you have to open and close the Document object yourself.
public SetControlOpenClose ( bool controlOpenClose ) : void
controlOpenClose bool set this to false if you plan to open/close the Document yourself
Résultat void

StartElement() public méthode

This method gets called when a start tag is encountered.
public StartElement ( String uri, String lname, String name, Hashtable attrs ) : void
uri String
lname String
name String the name of the tag that is encountered
attrs System.Collections.Hashtable the list of attributes
Résultat void

Property Details

chapters protected_oe property

Counts the number of chapters in this document.
protected int chapters
Résultat int

controlOpenClose protected_oe property

This is a flag that can be set, if you want to open and close the Document-object yourself.
protected bool controlOpenClose
Résultat bool

currentChunk protected_oe property

This is the current chunk to which characters can be added.
protected Chunk,iTextSharp.text currentChunk
Résultat iTextSharp.text.Chunk

document protected_oe property

This is the resulting document.
protected IDocListener document
Résultat IDocListener

ignore protected_oe property

This is the current chunk to which characters can be added.
protected bool ignore
Résultat bool

myTags protected_oe property

protected Hashtable,System.Collections myTags
Résultat System.Collections.Hashtable

stack protected_oe property

This is a Stack of objects, waiting to be added to the document.
protected Stack,System.Collections stack
Résultat System.Collections.Stack