HiraokaHyperTools.iTextSharp-LGPL
0.2.5
|
An abstract Writer class for documents. More...
Public Member Functions | |
virtual bool | Add (IElement element) |
Signals that an Element was added to the Document. More... | |
virtual void | Open () |
Signals that the Document was opened. More... | |
virtual bool | SetPageSize (Rectangle pageSize) |
Sets the pagesize. More... | |
virtual bool | SetMargins (float marginLeft, float marginRight, float marginTop, float marginBottom) |
Sets the margins. More... | |
virtual bool | NewPage () |
Signals that an new page has to be started. More... | |
virtual void | ResetHeader () |
Resets the header of this document. More... | |
virtual void | ResetFooter () |
Resets the footer of this document. More... | |
virtual void | ResetPageCount () |
Sets the page number to 0. More... | |
virtual void | Close () |
Signals that the Document was closed and that no other Elements will be added. More... | |
virtual void | Pause () |
Let the writer know that all writing has to be paused. More... | |
bool | IsPaused () |
virtual void | Resume () |
Let the writer know that writing may be resumed. More... | |
virtual void | Flush () |
Flushes the Stream. More... | |
virtual bool | SetMarginMirroring (bool marginMirroring) |
virtual bool | SetMarginMirroringTopBottom (bool MarginMirroring) |
Static Public Member Functions | |
static byte[] | GetISOBytes (string text) |
Converts a string into a Byte array according to the ISO-8859-1 codepage. More... | |
Static Public Attributes | |
const byte | NEWLINE = (byte)'\n' |
This is some byte that is often used. More... | |
const byte | TAB = (byte)'\t' |
This is some byte that is often used. More... | |
const byte | LT = (byte)'<' |
This is some byte that is often used. More... | |
const byte | SPACE = (byte)' ' |
This is some byte that is often used. More... | |
const byte | EQUALS = (byte)'=' |
This is some byte that is often used. More... | |
const byte | QUOTE = (byte)'\"' |
This is some byte that is often used. More... | |
const byte | GT = (byte)'>' |
This is some byte that is often used. More... | |
const byte | FORWARD = (byte)'/' |
This is some byte that is often used. More... | |
Protected Member Functions | |
DocWriter () | |
DocWriter (Document document, Stream os) | |
Constructs a DocWriter. More... | |
void | Write (string str) |
Writes a string to the stream. More... | |
void | AddTabs (int indent) |
Writes a number of tabs. More... | |
void | Write (string key, string value) |
Writes a key-value pair to the stream. More... | |
void | WriteStart (string tag) |
Writes a starttag to the stream. More... | |
void | WriteEnd (string tag) |
Writes an endtag to the stream. More... | |
void | WriteEnd () |
Writes an endtag to the stream. More... | |
bool | WriteMarkupAttributes (Properties markup) |
Writes the markup attributes of the specified MarkupAttributes object to the stream. More... | |
Protected Attributes | |
Rectangle | pageSize |
The pageSize. More... | |
Document | document |
This is the document that has to be written. More... | |
OutputStreamCounter | os |
The stream of this writer. More... | |
bool | open = false |
Is the writer open for writing? More... | |
bool | pause = false |
Do we have to pause all writing actions? More... | |
bool | closeStream = true |
Properties | |
virtual HeaderFooter | Header [set] |
Changes the header of this document. More... | |
virtual HeaderFooter | Footer [set] |
Changes the footer of this document. More... | |
virtual int | PageCount [set] |
Sets the page number. More... | |
virtual bool | CloseStream [get, set] |
![]() | |
int | PageCount [set] |
Sets the page number. More... | |
HeaderFooter | Header [set] |
Changes the header of this document. More... | |
HeaderFooter | Footer [set] |
Changes the footer of this document. More... | |
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.
|
protected |
|
protected |
|
virtual |
Signals that an Element was added to the Document.
This method should be overriden in the specific DocWriter classes derived from this abstract class.
element |
Implements iTextSharp.text.IElementListener.
Reimplemented in iTextSharp.text.rtf.RtfWriter2, and iTextSharp.text.html.HtmlWriter.
|
protected |
Writes a number of tabs.
indent | the number of tabs to add |
|
virtual |
Signals that the Document was closed and that no other Elements will be added.
Implements iTextSharp.text.IDocListener.
Reimplemented in iTextSharp.text.rtf.RtfWriter2, iTextSharp.text.pdf.PdfWriter, iTextSharp.text.pdf.PdfCopy, and iTextSharp.text.html.HtmlWriter.
|
virtual |
Flushes the Stream.
|
static |
Converts a string into a Byte array according to the ISO-8859-1 codepage.
text | the text to be converted |
bool iTextSharp.text.DocWriter.IsPaused | ( | ) |
Checks if writing is paused.
true
if writing temporarely has to be paused, false
otherwise.
|
virtual |
Signals that an new page has to be started.
This does nothing. Has to be overridden if needed.
Implements iTextSharp.text.IDocListener.
Reimplemented in iTextSharp.text.rtf.RtfWriter2, and iTextSharp.text.html.HtmlWriter.
|
virtual |
Signals that the Document was opened.
Implements iTextSharp.text.IDocListener.
Reimplemented in iTextSharp.text.rtf.RtfWriter2, iTextSharp.text.pdf.PdfWriter, and iTextSharp.text.html.HtmlWriter.
|
virtual |
Let the writer know that all writing has to be paused.
|
virtual |
Resets the footer of this document.
This method should be overriden in the specific DocWriter classes derived from this abstract class if they actually support the use of footers.
Implements iTextSharp.text.IDocListener.
Reimplemented in iTextSharp.text.rtf.RtfWriter2.
|
virtual |
Resets the header of this document.
This method should be overriden in the specific DocWriter classes derived from this abstract class if they actually support the use of headers.
Implements iTextSharp.text.IDocListener.
Reimplemented in iTextSharp.text.rtf.RtfWriter2.
|
virtual |
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.
Implements iTextSharp.text.IDocListener.
Reimplemented in iTextSharp.text.rtf.RtfWriter2.
|
virtual |
Let the writer know that writing may be resumed.
|
virtual |
Parameter that allows you to do margin mirroring (odd/even pages)
marginMirroring |
Implements iTextSharp.text.IDocListener.
|
virtual |
Implements iTextSharp.text.IDocListener.
|
virtual |
Sets the margins.
This does nothing. Has to be overridden if needed.
marginLeft | the margin on the left |
marginRight | the margin on the right |
marginTop | the margin on the top |
marginBottom | the margin on the bottom |
Implements iTextSharp.text.IDocListener.
Reimplemented in iTextSharp.text.rtf.RtfWriter2.
|
virtual |
Sets the pagesize.
pageSize | the new pagesize |
Implements iTextSharp.text.IDocListener.
Reimplemented in iTextSharp.text.rtf.RtfWriter2.
|
protected |
Writes a key-value pair to the stream.
key | the name of an attribute |
value | the value of an attribute |
|
protected |
Writes a string to the stream.
str | the string to write |
|
protected |
Writes an endtag to the stream.
|
protected |
Writes an endtag to the stream.
tag | the name of the tag |
|
protected |
Writes the markup attributes of the specified MarkupAttributes object to the stream.
mAtt | the MarkupAttributes to write. |
|
protected |
Writes a starttag to the stream.
tag | the name of the tag |
|
protected |
Closes the stream on document close
|
protected |
This is the document that has to be written.
|
static |
This is some byte that is often used.
|
static |
This is some byte that is often used.
|
static |
This is some byte that is often used.
|
static |
This is some byte that is often used.
|
static |
This is some byte that is often used.
|
protected |
Is the writer open for writing?
|
protected |
The stream of this writer.
|
protected |
The pageSize.
|
protected |
Do we have to pause all writing actions?
|
static |
This is some byte that is often used.
|
static |
This is some byte that is often used.
|
static |
This is some byte that is often used.
|
getset |
|
set |
Changes the footer of this document.
This method should be overriden in the specific DocWriter classes derived from this abstract class if they actually support the use of footers.
the new footer
|
set |
Changes the header of this document.
This method should be overriden in the specific DocWriter classes derived from this abstract class if they actually support the use of headers.
the new header
|
set |
Sets the page number.
This method should be overriden in the specific DocWriter classes derived from this abstract class if they actually support the use of pagenumbers.