C# Class iTextSharp.text.DocWriter

An abstract Writer class for documents.
DocWriter is the abstract class of several writers such as PdfWriter and HtmlWriter. A DocWriter can be added as a DocListener to a certain Document by getting an instance (see method GetInstance() in the specific writer-classes). Every Element added to the original Document will be written to the stream of the listening DocWriter.
Inheritance: IDocListener
Afficher le fichier Open project: mapo80/iTextSharp-Monotouch

Protected Properties

Свойство Type Description
closeStream bool
document Document
open bool
os iTextSharp.text.pdf.OutputStreamCounter
pageSize Rectangle
pause bool

Méthodes publiques

Méthode Description
Add ( IElement element ) : bool

Signals that an Element was added to the Document.

This method should be overriden in the specific DocWriter classes derived from this abstract class.

Close ( ) : void

Signals that the Document was closed and that no other Elements will be added.

Dispose ( ) : void
Flush ( ) : void

Flushes the Stream.

GetISOBytes ( string text ) : byte[]

Converts a string into a Byte array according to the ISO-8859-1 codepage.

IsPaused ( ) : bool
NewPage ( ) : bool

Signals that an new page has to be started.

This does nothing. Has to be overridden if needed.

Open ( ) : void

Signals that the Document was opened.

Pause ( ) : void

Let the writer know that all writing has to be paused.

ResetPageCount ( ) : void

Sets the page number to 0.

This method should be overriden in the specific DocWriter classes derived from this abstract class if they actually support the use of pagenumbers.

Resume ( ) : void

Let the writer know that writing may be resumed.

SetMarginMirroring ( bool marginMirroring ) : bool
SetMarginMirroringTopBottom ( bool MarginMirroring ) : bool
SetMargins ( float marginLeft, float marginRight, float marginTop, float marginBottom ) : bool

Sets the margins.

This does nothing. Has to be overridden if needed.

SetPageSize ( Rectangle pageSize ) : bool

Sets the pagesize.

Méthodes protégées

Méthode Description
AddTabs ( int indent ) : void

Writes a number of tabs.

DocWriter ( ) : System
DocWriter ( Document document, Stream os ) : System

Constructs a DocWriter.

Write ( string str ) : void

Writes a string to the stream.

Write ( string key, string value ) : void

Writes a key-value pair to the stream.

WriteEnd ( ) : void

Writes an endtag to the stream.

WriteEnd ( string tag ) : void

Writes an endtag to the stream.

WriteMarkupAttributes ( Properties markup ) : bool

Writes the markup attributes of the specified MarkupAttributes object to the stream.

WriteStart ( string tag ) : void

Writes a starttag to the stream.

Method Details

Add() public méthode

Signals that an Element was added to the Document.
This method should be overriden in the specific DocWriter classes derived from this abstract class.
public Add ( IElement element ) : bool
element IElement
Résultat bool

AddTabs() protected méthode

Writes a number of tabs.
protected AddTabs ( int indent ) : void
indent int the number of tabs to add
Résultat void

Close() public méthode

Signals that the Document was closed and that no other Elements will be added.
public Close ( ) : void
Résultat void

Dispose() public méthode

public Dispose ( ) : void
Résultat void

DocWriter() protected méthode

protected DocWriter ( ) : System
Résultat System

DocWriter() protected méthode

Constructs a DocWriter.
protected DocWriter ( Document document, Stream os ) : System
document Document The Document that has to be written
os Stream The Stream the writer has to write to.
Résultat System

Flush() public méthode

Flushes the Stream.
public Flush ( ) : void
Résultat void

GetISOBytes() public static méthode

Converts a string into a Byte array according to the ISO-8859-1 codepage.
public static GetISOBytes ( string text ) : byte[]
text string the text to be converted
Résultat byte[]

IsPaused() public méthode

public IsPaused ( ) : bool
Résultat bool

NewPage() public méthode

Signals that an new page has to be started.
This does nothing. Has to be overridden if needed.
public NewPage ( ) : bool
Résultat bool

Open() public méthode

Signals that the Document was opened.
public Open ( ) : void
Résultat void

Pause() public méthode

Let the writer know that all writing has to be paused.
public Pause ( ) : void
Résultat void

ResetPageCount() public méthode

Sets the page number to 0.
This method should be overriden in the specific DocWriter classes derived from this abstract class if they actually support the use of pagenumbers.
public ResetPageCount ( ) : void
Résultat void

Resume() public méthode

Let the writer know that writing may be resumed.
public Resume ( ) : void
Résultat void

SetMarginMirroring() public méthode

public SetMarginMirroring ( bool marginMirroring ) : bool
marginMirroring bool
Résultat bool

SetMarginMirroringTopBottom() public méthode

public SetMarginMirroringTopBottom ( bool MarginMirroring ) : bool
MarginMirroring bool
Résultat bool

SetMargins() public méthode

Sets the margins.
This does nothing. Has to be overridden if needed.
public SetMargins ( float marginLeft, float marginRight, float marginTop, float marginBottom ) : bool
marginLeft float the margin on the left
marginRight float the margin on the right
marginTop float the margin on the top
marginBottom float the margin on the bottom
Résultat bool

SetPageSize() public méthode

Sets the pagesize.
public SetPageSize ( Rectangle pageSize ) : bool
pageSize Rectangle the new pagesize
Résultat bool

Write() protected méthode

Writes a string to the stream.
protected Write ( string str ) : void
str string the string to write
Résultat void

Write() protected méthode

Writes a key-value pair to the stream.
protected Write ( string key, string value ) : void
key string the name of an attribute
value string the value of an attribute
Résultat void

WriteEnd() protected méthode

Writes an endtag to the stream.
protected WriteEnd ( ) : void
Résultat void

WriteEnd() protected méthode

Writes an endtag to the stream.
protected WriteEnd ( string tag ) : void
tag string the name of the tag
Résultat void

WriteMarkupAttributes() protected méthode

Writes the markup attributes of the specified MarkupAttributes object to the stream.
protected WriteMarkupAttributes ( Properties markup ) : bool
markup System.util.Properties
Résultat bool

WriteStart() protected méthode

Writes a starttag to the stream.
protected WriteStart ( string tag ) : void
tag string the name of the tag
Résultat void

Property Details

closeStream protected_oe property

protected bool closeStream
Résultat bool

document protected_oe property

This is the document that has to be written.
protected Document,iTextSharp.text document
Résultat Document

open protected_oe property

Is the writer open for writing?
protected bool open
Résultat bool

os protected_oe property

The stream of this writer.
protected OutputStreamCounter,iTextSharp.text.pdf os
Résultat iTextSharp.text.pdf.OutputStreamCounter

pageSize protected_oe property

The pageSize.
protected Rectangle,iTextSharp.text pageSize
Résultat Rectangle

pause protected_oe property

Do we have to pause all writing actions?
protected bool pause
Résultat bool