OpenPetra
Free Administration Software for Non-Profits
Ict.Common.Printing.TFormLettersTools Class Reference

helper functions for form letters, which can be used for printing to paper or preparing emails etc More...

Static Public Member Functions

static string GetRoleSpecificFile (string APath, string AFileID, string ACountryCode, string AFormsID, string AExtension)
 for form letter files, we need to check if there is a template specific for the country or form. Otherwise the next best fitting template is used More...
 
static bool AttachNextPage (ref string AResultDocument, string ANewPage)
 attach a new page to the overall document that will be printed later More...
 
static string GetContentsOfDiv (string ADocument, string ADivName)
 return the contents of the given div tag More...
 
static Dictionary< string, string > GetStyles (XmlNode ANode)
 split styles into a sorted list with keys and values More...
 
static string PrintSimpleHTMLLetter (string AFilename, SortedList< string, List< string > >AFields)
 Print a one-page letter, replacing defined fields More...
 
static string PrintLabels (string AFilename, List< string >ALabels, string ATitle)
 print HTML labels into an HTML template, create pages More...
 
static string PrintReport (string AFilename, SortedList< string, List< string > >AData, string ATitle, bool ASeparatePagesPerGroup)
 print a report into an HTML template More...
 
static bool CheckImagesFileExist (string AHTMLText)
 check for all image paths, if the images actually exist More...
 
static bool CloseDocument (ref string AResultDocument)
 close the document after one or several pages have been inserted. More...
 
static string GeneratePDFFromHTML (string AHTMLDoc, string APdfPath)
 Generate a PDF from an HTML Document, can contain several pages More...
 

Static Public Attributes

const string HEADERGROUP = "HEADERGROUP:"
 define the first row in the details to apply to the whole group More...
 

Detailed Description

helper functions for form letters, which can be used for printing to paper or preparing emails etc

Member Function Documentation

◆ AttachNextPage()

static bool Ict.Common.Printing.TFormLettersTools.AttachNextPage ( ref string  AResultDocument,
string  ANewPage 
)
inlinestatic

attach a new page to the overall document that will be printed later

Parameters
AResultDocument
ANewPage
Returns
false if the new page was empty

◆ CheckImagesFileExist()

static bool Ict.Common.Printing.TFormLettersTools.CheckImagesFileExist ( string  AHTMLText)
inlinestatic

check for all image paths, if the images actually exist

◆ CloseDocument()

static bool Ict.Common.Printing.TFormLettersTools.CloseDocument ( ref string  AResultDocument)
inlinestatic

close the document after one or several pages have been inserted.

Parameters
AResultDocument
Returns
false if the document is empty

◆ GeneratePDFFromHTML()

static string Ict.Common.Printing.TFormLettersTools.GeneratePDFFromHTML ( string  AHTMLDoc,
string  APdfPath 
)
inlinestatic

Generate a PDF from an HTML Document, can contain several pages

Returns
path of the temporary PDF file

◆ GetContentsOfDiv()

static string Ict.Common.Printing.TFormLettersTools.GetContentsOfDiv ( string  ADocument,
string  ADivName 
)
inlinestatic

return the contents of the given div tag

Parameters
ADocument
ADivName
Returns

◆ GetRoleSpecificFile()

static string Ict.Common.Printing.TFormLettersTools.GetRoleSpecificFile ( string  APath,
string  AFileID,
string  ACountryCode,
string  AFormsID,
string  AExtension 
)
inlinestatic

for form letter files, we need to check if there is a template specific for the country or form. Otherwise the next best fitting template is used

Parameters
APath
AFileID
ACountryCode
AFormsIDseveral classifications be separated by a dot, eg. adult.serve. If there is no template for adult.serve, use the template for adult
AExtension
Returns

◆ GetStyles()

static Dictionary< string, string > Ict.Common.Printing.TFormLettersTools.GetStyles ( XmlNode  ANode)
inlinestatic

split styles into a sorted list with keys and values

◆ PrintLabels()

static string Ict.Common.Printing.TFormLettersTools.PrintLabels ( string  AFilename,
List< string >  ALabels,
string  ATitle 
)
inlinestatic

print HTML labels into an HTML template, create pages

Parameters
AFilename
ALabels
ATitletitle to print in the page footer
Returns

◆ PrintReport()

static string Ict.Common.Printing.TFormLettersTools.PrintReport ( string  AFilename,
SortedList< string, List< string > >  AData,
string  ATitle,
bool  ASeparatePagesPerGroup 
)
inlinestatic

print a report into an HTML template

Parameters
AFilename
ADataA string-indexed list of values which are themselves lists
ATitletitle to print in the page footer
ASeparatePagesPerGrouppage break for each group
Returns

◆ PrintSimpleHTMLLetter()

static string Ict.Common.Printing.TFormLettersTools.PrintSimpleHTMLLetter ( string  AFilename,
SortedList< string, List< string > >  AFields 
)
inlinestatic

Print a one-page letter, replacing defined fields

Parameters
AFilenameFull path
AFieldsValue is always element [0] except for repeated elements
Returns

Member Data Documentation

◆ HEADERGROUP

const string Ict.Common.Printing.TFormLettersTools.HEADERGROUP = "HEADERGROUP:"
static

define the first row in the details to apply to the whole group


The documentation for this class was generated from the following file: