a class that renders HTML, ie. prints HTML to Screen or PDF
More...
|
static XmlDocument | ParseHtml (string AHtmlDocument) |
| try to parse HTML document More...
|
|
static float | Pixel2Inch (Int32 APixel) |
| the px value from an HTML document is converted to an inch value for printing More...
|
|
static string | GetTableRow (string ATemplate, string ASearchFor, out string ATemplateRow) |
| find the <tr> tag that contains the ASearchFor, and return the full tr tag and contents More...
|
|
static string | GetTableRowByDetailComment (string ATemplate, out string ATemplateRow) |
| find section that starts with BEGIN detail comment and ends with END detail comment More...
|
|
static string | GetTitle (string AHtmlMessage) |
| returns the title of the html document More...
|
|
static string | RemoveDivWithName (string AHtmlMessage, string ADivName) |
| remove a div with the given name More...
|
|
static string | RemoveDivWithClass (string AHtmlMessage, string ADivClass) |
| remove all divs of the given class More...
|
|
static string | RemoveElement (string AHtmlMessage, string AElementName, string AAttributeName, string ADivID, out string AElementCode) |
| remove all elments with given name or class More...
|
|
|
string | HtmlToText (string sOrig) |
| special codes need to be converted from HTML to printable text More...
|
|
float | PrintTable (float AXPos, float AWidthAvailable, ref XmlNode curNode) |
| print an html table More...
|
|
a class that renders HTML, ie. prints HTML to Screen or PDF
◆ TPrinterHtml() [1/2]
Ict.Common.Printing.TPrinterHtml.TPrinterHtml |
( |
string |
AHtmlDocument, |
|
|
string |
APath, |
|
|
TPrinter |
APrinter |
|
) |
| |
|
inline |
constructor
- Parameters
-
AHtmlDocument | |
APath | Used for embedding images |
APrinter | |
◆ TPrinterHtml() [2/2]
Ict.Common.Printing.TPrinterHtml.TPrinterHtml |
( |
string |
AHtmlFile, |
|
|
TPrinter |
APrinter |
|
) |
| |
|
inline |
◆ GetPageSize()
override bool Ict.Common.Printing.TPrinterHtml.GetPageSize |
( |
out PaperKind |
APaperKind, |
|
|
out Margins |
AMargins, |
|
|
out float |
AWidthInPoint, |
|
|
out float |
AHeightInPoint |
|
) |
| |
|
inlinevirtual |
◆ GetTableRow()
static string Ict.Common.Printing.TPrinterHtml.GetTableRow |
( |
string |
ATemplate, |
|
|
string |
ASearchFor, |
|
|
out string |
ATemplateRow |
|
) |
| |
|
inlinestatic |
find the <tr> tag that contains the ASearchFor, and return the full tr tag and contents
- Parameters
-
ATemplate | |
ASearchFor | |
ATemplateRow | template for one row |
- Returns
- modified template, replace tr tag with #ROWTEMPLATE
◆ GetTableRowByDetailComment()
static string Ict.Common.Printing.TPrinterHtml.GetTableRowByDetailComment |
( |
string |
ATemplate, |
|
|
out string |
ATemplateRow |
|
) |
| |
|
inlinestatic |
find section that starts with BEGIN detail comment and ends with END detail comment
- Parameters
-
ATemplate | |
ATemplateRow | template for one row |
- Returns
- modified template, replace detail block with #ROWTEMPLATE
◆ GetTitle()
static string Ict.Common.Printing.TPrinterHtml.GetTitle |
( |
string |
AHtmlMessage | ) |
|
|
inlinestatic |
returns the title of the html document
- Parameters
-
- Returns
◆ HtmlToText()
string Ict.Common.Printing.TPrinterHtml.HtmlToText |
( |
string |
sOrig | ) |
|
|
inlineprotected |
special codes need to be converted from HTML to printable text
- Parameters
-
- Returns
◆ ParseHtml()
static XmlDocument Ict.Common.Printing.TPrinterHtml.ParseHtml |
( |
string |
AHtmlDocument | ) |
|
|
inlinestatic |
try to parse HTML document
◆ Pixel2Inch()
static float Ict.Common.Printing.TPrinterHtml.Pixel2Inch |
( |
Int32 |
APixel | ) |
|
|
inlinestatic |
the px value from an HTML document is converted to an inch value for printing
- Parameters
-
- Returns
◆ PrintPageBody()
override void Ict.Common.Printing.TPrinterHtml.PrintPageBody |
( |
| ) |
|
|
inlinevirtual |
◆ PrintPageFooter()
override void Ict.Common.Printing.TPrinterHtml.PrintPageFooter |
( |
| ) |
|
|
inlinevirtual |
◆ PrintPageHeader()
override void Ict.Common.Printing.TPrinterHtml.PrintPageHeader |
( |
| ) |
|
|
inlinevirtual |
◆ PrintTable()
float Ict.Common.Printing.TPrinterHtml.PrintTable |
( |
float |
AXPos, |
|
|
float |
AWidthAvailable, |
|
|
ref XmlNode |
curNode |
|
) |
| |
|
inlineprotected |
print an html table
- Returns
- the height of the table
◆ RemoveDivWithClass()
static string Ict.Common.Printing.TPrinterHtml.RemoveDivWithClass |
( |
string |
AHtmlMessage, |
|
|
string |
ADivClass |
|
) |
| |
|
inlinestatic |
remove all divs of the given class
◆ RemoveDivWithName()
static string Ict.Common.Printing.TPrinterHtml.RemoveDivWithName |
( |
string |
AHtmlMessage, |
|
|
string |
ADivName |
|
) |
| |
|
inlinestatic |
remove a div with the given name
- Parameters
-
- Returns
◆ RemoveElement()
static string Ict.Common.Printing.TPrinterHtml.RemoveElement |
( |
string |
AHtmlMessage, |
|
|
string |
AElementName, |
|
|
string |
AAttributeName, |
|
|
string |
ADivID, |
|
|
out string |
AElementCode |
|
) |
| |
|
inlinestatic |
remove all elments with given name or class
◆ RenderContent()
override float Ict.Common.Printing.TPrinterHtml.RenderContent |
( |
float |
AXPos, |
|
|
float |
AWidthAvailable, |
|
|
ref XmlNode |
curNode |
|
) |
| |
|
inlinevirtual |
interpret HTML code
- Parameters
-
AXPos | the X position to start the content |
AWidthAvailable | AWidthAvailable |
curNode | |
- Returns
- the height of the content
Reimplemented from Ict.Common.Printing.TPrinterLayout.
◆ StartPrintDocument()
override void Ict.Common.Printing.TPrinterHtml.StartPrintDocument |
( |
| ) |
|
|
inlinevirtual |
◆ FCurrentNodeNextPage
XmlNode Ict.Common.Printing.TPrinterHtml.FCurrentNodeNextPage |
|
protected |
◆ FHasMorePages
bool Ict.Common.Printing.TPrinterHtml.FHasMorePages = false |
|
protected |
local version used for preprinting HTML to discover total number of pages
◆ FHtmlDoc
XmlDocument Ict.Common.Printing.TPrinterHtml.FHtmlDoc |
|
protected |
◆ FPath
string Ict.Common.Printing.TPrinterHtml.FPath |
|
protected |
◆ FPrinter
TPrinter Ict.Common.Printing.TPrinterHtml.FPrinter |
|
protected |
The documentation for this class was generated from the following file: