C# Класс iTextSharp.text.xml.ITextHandler

The iTextHandler-class maps several XHTML-tags to iText-objects.
Наследование: ParserBase
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
chapters int
controlOpenClose bool
currentChunk iTextSharp.text.Chunk
document IDocListener
ignore bool
myTags System.Collections.Hashtable
stack System.Collections.Stack

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
AddImage ( Image img ) : void
IsDocumentRoot ( String tag ) : bool

Checks if a certain tag corresponds with the roottag.

Приватные методы

Метод Описание
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.

Описание методов

AddImage() защищенный Метод

protected AddImage ( Image img ) : void
img Image
Результат void

Characters() публичный Метод

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
Результат void

EndElement() публичный Метод

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
Результат void

HandleEndingTags() публичный Метод

This method deals with the starting tags.
public HandleEndingTags ( String name ) : void
name String the name of the tag
Результат void

HandleStartingTags() публичный Метод

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
Результат void

ITextHandler() публичный Метод

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
Результат System

ITextHandler() публичный Метод

public ITextHandler ( IDocListener document, Hashtable myTags ) : System
document IDocListener
myTags System.Collections.Hashtable
Результат System

ITextHandler() публичный Метод

public ITextHandler ( IDocListener document, HtmlTagMap myTags ) : System
document IDocListener
myTags iTextSharp.text.html.HtmlTagMap
Результат System

ITextHandler() публичный Метод

public ITextHandler ( IDocListener document, HtmlTagMap myTags, BaseFont bf ) : System
document IDocListener
myTags iTextSharp.text.html.HtmlTagMap
bf iTextSharp.text.pdf.BaseFont
Результат System

IgnorableWhitespace() публичный Метод

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
Результат void

IsDocumentRoot() защищенный Метод

Checks if a certain tag corresponds with the roottag.
protected IsDocumentRoot ( String tag ) : bool
tag String a presumed tagname
Результат bool

SetControlOpenClose() публичный Метод

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
Результат void

StartElement() публичный Метод

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
Результат void

Описание свойств

chapters защищенное свойство

Counts the number of chapters in this document.
protected int chapters
Результат int

controlOpenClose защищенное свойство

This is a flag that can be set, if you want to open and close the Document-object yourself.
protected bool controlOpenClose
Результат bool

currentChunk защищенное свойство

This is the current chunk to which characters can be added.
protected Chunk,iTextSharp.text currentChunk
Результат iTextSharp.text.Chunk

document защищенное свойство

This is the resulting document.
protected IDocListener document
Результат IDocListener

ignore защищенное свойство

This is the current chunk to which characters can be added.
protected bool ignore
Результат bool

myTags защищенное свойство

protected Hashtable,System.Collections myTags
Результат System.Collections.Hashtable

stack защищенное свойство

This is a Stack of objects, waiting to be added to the document.
protected Stack,System.Collections stack
Результат System.Collections.Stack