HiraokaHyperTools.iTextSharp-LGPL
0.2.5
|
A generic Document class. More...
Public Member Functions | |
Document () | |
Constructs a new Document-object. More... | |
Document (Rectangle pageSize) | |
Constructs a new Document-object. More... | |
Document (Rectangle pageSize, float marginLeft, float marginRight, float marginTop, float marginBottom) | |
Constructs a new Document-object. More... | |
void | AddDocListener (IDocListener listener) |
Adds a IDocListener to the Document. More... | |
void | RemoveIDocListener (IDocListener listener) |
Removes a IDocListener from the Document. More... | |
virtual bool | Add (IElement element) |
Adds an Element to the Document. More... | |
virtual void | Open () |
Opens the document. 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 () |
Closes the document. More... | |
bool | AddHeader (string name, string content) |
Adds a user defined header to the document. More... | |
bool | AddTitle (string title) |
Adds the title to a Document. More... | |
bool | AddSubject (string subject) |
Adds the subject to a Document. More... | |
bool | AddKeywords (string keywords) |
Adds the keywords to a Document. More... | |
bool | AddAuthor (string author) |
Adds the author to a Document. More... | |
bool | AddCreator (string creator) |
Adds the creator to a Document. More... | |
bool | AddProducer () |
Adds the producer to a Document. More... | |
bool | AddCreationDate () |
Adds the current date and time to a Document. More... | |
float | GetLeft (float margin) |
Returns the lower left x-coordinate considering a given margin. More... | |
float | GetRight (float margin) |
Returns the upper right x-coordinate, considering a given margin. More... | |
float | GetTop (float margin) |
Returns the upper right y-coordinate, considering a given margin. More... | |
float | GetBottom (float margin) |
Returns the lower left y-coordinate, considering a given margin. More... | |
bool | IsOpen () |
Checks if the document is open. More... | |
virtual bool | SetMarginMirroring (bool marginMirroring) |
virtual bool | SetMarginMirroringTopBottom (bool marginMirroringTopBottom) |
bool | IsMarginMirroring () |
Static Public Attributes | |
static bool | Compress = true |
summary> Scales the WMF font size. The default value is 0.86. More... | |
static float | WmfFontCorrection = 0.86f |
summary> The IDocListener. More... | |
Protected Attributes | |
bool | open |
summary> Has the document allready been closed? More... | |
bool | close |
Rectangle | pageSize |
The size of the page. More... | |
float | marginLeft = 0 |
summary> margin in x direction starting from the right More... | |
float | marginRight = 0 |
summary> margin in y direction starting from the top More... | |
float | marginTop = 0 |
summary> margin in y direction starting from the bottom More... | |
float | marginBottom = 0 |
bool | marginMirroring = false |
bool | marginMirroringTopBottom = false |
summary> Content of JavaScript onLoad function More... | |
string | javaScript_onLoad = null |
summary> Content of JavaScript onUnLoad function More... | |
string | javaScript_onUnLoad = null |
summary> Style class in HTML body tag More... | |
string | htmlStyleClass = null |
int | pageN = 0 |
Current pagenumber More... | |
HeaderFooter | header = null |
summary> This is the textual part of the footer More... | |
HeaderFooter | footer = null |
int | chapternumber = 0 |
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... | |
int | PageNumber [get] |
Returns the current page number. More... | |
float | LeftMargin [get] |
Returns the left margin. More... | |
float | RightMargin [get] |
Return the right margin. More... | |
float | TopMargin [get] |
Returns the top margin. More... | |
float | BottomMargin [get] |
Returns the bottom margin. More... | |
float | Left [get] |
Returns the lower left x-coordinate. More... | |
float | Right [get] |
Returns the upper right x-coordinate. More... | |
float | Top [get] |
Returns the upper right y-coordinate. More... | |
float | Bottom [get] |
Returns the lower left y-coordinate. More... | |
Rectangle | PageSize [get] |
Gets the pagesize. More... | |
static String | Product [get] |
static String | Release [get] |
static string | Version [get] |
Gets the iText version. More... | |
string | JavaScript_onLoad [get, set] |
Gets the JavaScript onLoad command. More... | |
string | JavaScript_onUnLoad [get, set] |
Gets the JavaScript onUnLoad command. More... | |
string | HtmlStyleClass [get, set] |
Gets the style class of the HTML body tag More... | |
![]() | |
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... | |
A generic Document class.
All kinds of Text-elements can be added to a HTMLDocument. The Document signals all the listeners when an element has been added.
iTextSharp.text.Document.Document | ( | ) |
Constructs a new Document-object.
<overloads> Has three overloads. </overloads>
iTextSharp.text.Document.Document | ( | Rectangle | pageSize | ) |
Constructs a new Document-object.
pageSize | the pageSize |
iTextSharp.text.Document.Document | ( | Rectangle | pageSize, |
float | marginLeft, | ||
float | marginRight, | ||
float | marginTop, | ||
float | marginBottom | ||
) |
Constructs a new Document-object.
pageSize | the pageSize |
marginLeft | the margin on the left |
marginRight | the margin on the right |
marginTop | the margin on the top |
marginBottom | the margin on the bottom |
|
virtual |
Adds an Element to the Document.
element | the Element to add |
Implements iTextSharp.text.IElementListener.
Reimplemented in iTextSharp.text.pdf.PdfDocument.
bool iTextSharp.text.Document.AddAuthor | ( | string | author | ) |
Adds the author to a Document.
author | the name of the author |
bool iTextSharp.text.Document.AddCreationDate | ( | ) |
Adds the current date and time to a Document.
bool iTextSharp.text.Document.AddCreator | ( | string | creator | ) |
Adds the creator to a Document.
creator | the name of the creator |
void iTextSharp.text.Document.AddDocListener | ( | IDocListener | listener | ) |
Adds a IDocListener to the Document.
listener | the new IDocListener |
bool iTextSharp.text.Document.AddHeader | ( | string | name, |
string | content | ||
) |
Adds a user defined header to the document.
name | the name of the header |
content | the content of the header |
bool iTextSharp.text.Document.AddKeywords | ( | string | keywords | ) |
Adds the keywords to a Document.
keywords | keywords to add |
bool iTextSharp.text.Document.AddProducer | ( | ) |
Adds the producer to a Document.
bool iTextSharp.text.Document.AddSubject | ( | string | subject | ) |
Adds the subject to a Document.
subject | the subject |
bool iTextSharp.text.Document.AddTitle | ( | string | title | ) |
|
virtual |
Closes the document.
Once all the content has been written in the body, you have to close the body. After that nothing can be written to the body anymore.
Implements iTextSharp.text.IDocListener.
Reimplemented in iTextSharp.text.pdf.PdfDocument.
float iTextSharp.text.Document.GetBottom | ( | float | margin | ) |
Returns the lower left y-coordinate, considering a given margin.
margin | a margin |
float iTextSharp.text.Document.GetLeft | ( | float | margin | ) |
Returns the lower left x-coordinate considering a given margin.
margin | a margin |
float iTextSharp.text.Document.GetRight | ( | float | margin | ) |
Returns the upper right x-coordinate, considering a given margin.
margin | a margin |
float iTextSharp.text.Document.GetTop | ( | float | margin | ) |
Returns the upper right y-coordinate, considering a given margin.
margin | a margin |
bool iTextSharp.text.Document.IsMarginMirroring | ( | ) |
Gets the margin mirroring flag.
bool iTextSharp.text.Document.IsOpen | ( | ) |
Checks if the document is open.
|
virtual |
Signals that an new page has to be started.
Implements iTextSharp.text.IDocListener.
Reimplemented in iTextSharp.text.pdf.PdfDocument.
|
virtual |
Opens the document.
Once the document is opened, you can't write any Header- or Meta-information anymore. You have to open the document before you can begin to add content to the body of the document.
Implements iTextSharp.text.IDocListener.
Reimplemented in iTextSharp.text.pdf.PdfDocument.
void iTextSharp.text.Document.RemoveIDocListener | ( | IDocListener | listener | ) |
Removes a IDocListener from the Document.
listener | the IDocListener that has to be removed. |
|
virtual |
Resets the footer of this document.
Implements iTextSharp.text.IDocListener.
Reimplemented in iTextSharp.text.pdf.PdfDocument.
|
virtual |
Resets the header of this document.
Implements iTextSharp.text.IDocListener.
Reimplemented in iTextSharp.text.pdf.PdfDocument.
|
virtual |
Sets the page number to 0.
Implements iTextSharp.text.IDocListener.
Reimplemented in iTextSharp.text.pdf.PdfDocument.
|
virtual |
Set the margin mirroring. It will mirror right/left margins for odd/even pages.
Note: it will not work with Table.
marginMirroring | true to mirror the margins |
true
Implements iTextSharp.text.IDocListener.
Reimplemented in iTextSharp.text.pdf.PdfDocument.
|
virtual |
Set the margin mirroring. It will mirror top/bottom margins for odd/even pages.
Note: it will not work with Table.
marginMirroringTopBottom | true to mirror the margins |
true
Implements iTextSharp.text.IDocListener.
Reimplemented in iTextSharp.text.pdf.PdfDocument.
|
virtual |
Sets the margins.
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.pdf.PdfDocument.
|
virtual |
Sets the pagesize.
pageSize | the new pagesize |
Implements iTextSharp.text.IDocListener.
Reimplemented in iTextSharp.text.pdf.PdfDocument.
|
protected |
This is a chapter number in case ChapterAutoNumber is used.
|
protected |
|
static |
summary> Scales the WMF font size. The default value is 0.86.
|
protected |
|
protected |
summary> This is the textual part of the footer
|
protected |
|
protected |
summary> Content of JavaScript onUnLoad function
|
protected |
summary> Style class in HTML body tag
|
protected |
|
protected |
summary> margin in x direction starting from the right
|
protected |
|
protected |
summary> Content of JavaScript onLoad function
mirroring of the top/bottom margins
|
protected |
summary> margin in y direction starting from the top
|
protected |
summary> margin in y direction starting from the bottom
|
protected |
summary> Has the document allready been closed?
|
protected |
Current pagenumber
summary> This is the textual part of a Page; it can contain a header
|
protected |
The size of the page.
summary> margin in x direction starting from the left
|
static |
summary> The IDocListener.
|
get |
Returns the lower left y-coordinate.
the lower left y-coordinate.
|
get |
Returns the bottom margin.
the bottom margin
|
set |
Changes the footer of this document.
|
set |
Changes the header of this document.
|
getset |
Gets the style class of the HTML body tag
the style class of the HTML body tag
|
getset |
Gets the JavaScript onLoad command.
the JavaScript onLoad command.
|
getset |
Gets the JavaScript onUnLoad command.
the JavaScript onUnLoad command
|
get |
Returns the lower left x-coordinate.
the lower left x-coordinate
|
get |
Returns the left margin.
the left margin
|
set |
Sets the page number.
an int
|
get |
Returns the current page number.
an int
|
get |
Gets the pagesize.
the page size
|
staticget |
Gets the product name. This method may only be changed by Paulo Soares and/or Bruno Lowagie.
|
staticget |
Gets the release number. This method may only be changed by Paulo Soares and/or Bruno Lowagie.
|
get |
Returns the upper right x-coordinate.
the upper right x-coordinate.
|
get |
Return the right margin.
the right margin
|
get |
Returns the upper right y-coordinate.
the upper right y-coordinate.
|
get |
Returns the top margin.
the top margin
|
staticget |
Gets the iText version.
iText version