Class Cxhtml2pdf

Description

Located in /class.xhtml2pdf.php (line 84)


	
			
Variable Summary
Method Summary
Cxhtml2pdf Cxhtml2pdf ()
void addBottomMarker ()
boolean addCodeForEzPDF (string $szCode)
boolean addReplacement (mixed $arrData, hash $replacements)
boolean addTextToStack (string $szText)
true createParamList (array $arrOpts)
boolean createTextMethod (string $htmlTag)
void debug (string $szString, [mixed $bNoBr = false], [mixed $bExtern = false])
boolean endList (mixed $htmlTag, string $szTag)
boolean executePDFCode ()
boolean executeTag (string $szTag, string $szLastText, array $arrTagInfo)
int ezGetPosY ()
int ezGetWidth ()
string flushText ()
string getAbsolutePathOfElement (string $hndElement)
string getAttributeVal (string $szKey)
array getCurrentState ()
string getRootDirectory ()
int getTotalLists ()
int getYPosForCenterAlignment (string $szString, [int $iFontSize = 6])
boolean lookupTag (string $szTag)
hash mergeHash (hash $arrBase, hash $arrAdd)
hash parseTag (string $szText)
true processData ()
boolean restoreParamState (string $szTag)
void run ()
boolean saveParamState (array $arrOpts)
boolean setCurrentTextOfStack (string $szText)
true setData ()
booelan setInput (string $htmlInput)
void setLastAttributeList (array $arrInfo)
void setMargins ()
boolean setPreferencesOfTag (string $szTag, array $arrTagInfo)
boolean setReplacements ()
boolean setRootDirectory (string $hndDir)
boolean setSourceFile (mixed $htmlInput, string $absPath)
boolean setSourceText (string $htmlText)
string shortenText (mixed $szString)
boolean startList (string $szTag)
void throwError (string $szError)
string traceList ()
Variables
mixed $arrAttributeRefer = array() (line 114)
mixed $arrEvalForEzPDF = array() (line 120)
mixed $arrQ = array() (line 107)
mixed $arrReplacements = array() (line 99)
mixed $arrRunningQ = array() (line 110)
mixed $arrStackText = array() (line 109)
mixed $arrStates = array() (line 112)
mixed $arrTags = array() (line 93)
mixed $arrTagsClass = array() (line 95)
mixed $arrTagsIgnored = array("html","head") (line 97)
mixed $arrTagStack = array() (line 105)
mixed $bDebug = false (line 101)
mixed $cacheFontSizeArray = array() (line 126)
mixed $cacheListArray = array() (line 124)
mixed $cacheListArrayEntries = array() (line 125)
mixed $cacheTotalLists = 0 (line 123)
mixed $defaultDirectory = "" (line 117)
mixed $defaultFont = "Helvetica" (line 115)
mixed $defaultStyle = array() (line 103)
mixed $htmlInput = "" (line 87)
mixed $iElementDepth = 0 (line 113)
mixed $__data = "" (line 89)
mixed $__output = "" (line 91)
Methods
Constructor Cxhtml2pdf (line 129)
Cxhtml2pdf Cxhtml2pdf ()
addBottomMarker (line 781)

addBottomMarker()

adds a bottom marker

void addBottomMarker ()
addCodeForEzPDF (line 606)

addCodeForEzPDF($szCode)

adds the specified code $szCode to the $arrEvalEzPDF-Array

  • return: true
boolean addCodeForEzPDF (string $szCode)
  • string $szCode: PHP-code
addReplacement (line 253)

addReplacement($data)

adds an array to $this->arrReplacements with new replacements

boolean addReplacement (mixed $arrData, hash $replacements)
  • hash $replacements
addTextToStack (line 642)

addTextToStack($szText)

adds text to the stack text

  • return: true;
boolean addTextToStack (string $szText)
  • string $szText: text to add
createParamList (line 1036)

createParamList($arrOpts)

creates an evaled-param list

true createParamList (array $arrOpts)
  • array $arrOpts: array with params
createTextMethod (line 717)

createTextMethod($htmlTag) target of this method is to create a evaled $pdf->ezText() method.

this evaled method contains all important parameters, such as font, font-size, padding, intendent and so on support for CSS through class.styleparser.php is planed for the future

  • return: true
boolean createTextMethod (string $htmlTag)
  • string $htmlTag: name of Tag which is called
debug (line 1074)

debug($szString)

void debug (string $szString, [mixed $bNoBr = false], [mixed $bExtern = false])
  • string $szString: debug
endList (line 853)

endList($szTag)

removes the last element from the cacheArrayLists array

  • return: true
boolean endList (mixed $htmlTag, string $szTag)
  • string $szTag: name of list (ol|ul)
executePDFCode (line 617)

executePDFCode()

executes all code, which is saved in $arrEvalForEzPDF

  • return: true
boolean executePDFCode ()
executeTag (line 488)

executeTag($szTag,$szLastText,$arrTagInfo)

executes the corresponding tag-plugin

  • return: true
boolean executeTag (string $szTag, string $szLastText, array $arrTagInfo)
  • string $szTag: name of tag, which has to be called
  • string $szLastText: text which contains last text
  • array $arrTagInfo: information about the tag, e.g. style, id or so on
ezGetPosY (line 738)

ezGetPosY()

returns the current y-position

int ezGetPosY ()
ezGetWidth (line 757)

ezGetWidth()

returns the width of the document

int ezGetWidth ()
flushText (line 690)

flushText()

merges the complete text-stack and returns it

  • return: content of text-stack
string flushText ()
getAbsolutePathOfElement (line 1168)

getAbsolutePathOfElement($hndElement)

returns a string, which is generated through the default directory

  • return: name of complete path
string getAbsolutePathOfElement (string $hndElement)
  • string $hndElement: name of file, can be used with a path
getAttributeVal (line 541)

getAttributeVal($szKey)

returns the key of the last attriubte of element

  • return: value of key
string getAttributeVal (string $szKey)
  • string $szKey: key-name
getCurrentState (line 1018)

getCurrenState()

returns the current state position

  • return: state array
array getCurrentState ()
getCurrentTextOfStack (line 673)

getCurrentTextOfStack()

gets the last element of the text-stack

  • return: when stack is not empty, boolean false when stack is empty
mixed getCurrentTextOfStack ()
getRootDirectory (line 1157)

getRootDirectory() gets root directory.

  • return: absolute path of root-directory
string getRootDirectory ()
getTotalLists (line 915)

getTotalLists() returns the number of total open lists.

  • return: number of open lists
int getTotalLists ()
getYPosForCenterAlignment (line 834)

getYPosForCenterAlignment($szString, $iFontSize = 6)

returns the y-position, so that the given string is centered

  • return: position of y-axis
int getYPosForCenterAlignment (string $szString, [int $iFontSize = 6])
  • string $szString: string which should be centered
  • int $iFontSize: font size
incrementCurrentList (line 901)

incrementCurrentList()

increments the current list value

  • return: true
boolean incrementCurrentList ()
lookupTag (line 559)

lookupTag($szTag)

searches for the tag-plugin $szTag and adds it to the array

boolean lookupTag (string $szTag)
  • string $szTag: name of tag
mergeHash (line 1103)

mergeHash($arrBase,$arrAdd)

merges two hashs

  • return: contains the new data
hash mergeHash (hash $arrBase, hash $arrAdd)
  • hash $arrBase: base array
  • hash $arrAdd: additional array, overrides the arrBase-entry
parseTag (line 406)

parseTag($szText)

parses the string $szText and set the current tag, attributes and styles

  • return: information about tag
hash parseTag (string $szText)
  • string $szText: tag
processData (line 323)

processData()

main-method for starting the converting

true processData ()
restoreParamState (line 985)

restoreParamState($szTag)

restores the last saved options. The param can be used for checking the right element is kicked

  • return: true
boolean restoreParamState (string $szTag)
  • string $szTag: name of tag
run (line 194)

run()

run convert-mechanism

void run ()
saveParamState (line 945)

saveParamState($arrOpts)

saves the current settings for text, width etc in an array. This settings can be restored through restoreState() saveParamState although generates an eval-string, which contains the "real" param list

  • return: true
boolean saveParamState (array $arrOpts)
  • array $arrOpts: options
setCurrentTextOfStack (line 656)

setCurrentTextOfStack($szText)

sets the last element of the text-stack to the new text

  • return: true
boolean setCurrentTextOfStack (string $szText)
  • string $szText: text to set
setData (line 274)

setData() set the data, which will be converted.

the function splits the input an does replacements. setData is more or less a pre-parsing of the document.

true setData ()
setInput (line 214)

setInput($html)

booelan setInput (string $htmlInput)
  • string $htmlInput: htmlInput Input HTML
setLastAttributeList (line 530)

setLastAttributeList($arrInfo)

sets the last attribute list of the assigned element

void setLastAttributeList (array $arrInfo)
  • array $arrInfo: which contains the data
setMargins (line 747)

setMargins()

sets the margin of the document

void setMargins ()
setPreferencesOfTag (line 512)

setPreferencesOfTag($szTag,$arrTagInfo)

calls the function setPreferences($szTag,$arrTagInfo) in the assigned tag-class (if exist)

  • return: true
boolean setPreferencesOfTag (string $szTag, array $arrTagInfo)
  • string $szTag: name of tag
  • array $arrTagInfo: information about the tag
setReplacements (line 232)

setReplacements()

uses the $arrReplacements to replace special strings / signs

boolean setReplacements ()
setRootDirectory (line 1135)

setRootDirectory($hndDir) sets the root directory in where to search for a style-sheet, an image etc.

  • return: true
boolean setRootDirectory (string $hndDir)
  • string $hndDir: name of directoy, must be absolute
setSourceFile (line 161)

setSourceFile($absPath)

set the input as path. this can be an url (has to start with http://) or a path

  • return: true
boolean setSourceFile (mixed $htmlInput, string $absPath)
  • string $absPath
setSourceText (line 185)

setSourceText($htmlText)

sets the input as a text

  • return: true
boolean setSourceText (string $htmlText)
  • string $htmlText: html-source
shortenText (line 767)

shortenText($szString)

trims the string

string shortenText (mixed $szString)
startList (line 879)

startList($szTag)

starts a new list with given tag

  • return: true
boolean startList (string $szTag)
  • string $szTag: name of list (ol|ul)
throwError (line 1058)

throwError($error)

void throwError (string $szError)
  • string $szError: error error which should be thrown
traceList (line 925)

traceList()

goes through the cacheArrayList and creates a line

  • return: string with data
string traceList ()

Documentation generated on Tue, 29 Mar 2005 12:37:31 +0200 by phpDocumentor 1.3.0RC3