eZPDFTable Class Reference
[PDF generator library]

eZPDFTable adds extra support for tables More...

Inheritance diagram for eZPDFTable:
Cezpdf Cpdf

List of all members.

Public Member Functions

 addDocSpecFunction ($functionName, $parameters)
 addDocSpecification ($text)
 addToPreStack ($options=array())
 callAnchor ($info)
 callBlockFrame ($params, $text)
 callCircle ($info)
 callDrawLine ($info)
 callFilledRectangle ($info)
 callFont ($params)
 callFrame ($params, $text)
 callFrameLine ($info)
 callFrameMargins ($info)
 callFrontpage ($params, $text)
 callHeader ($params)
 callImage ($info)
 callIndex ($info)
 callInsertTOC ($info)
 callKeyword ($info)
 callLine ($params, $text)
 callNewPage ($info)
 callRectangle ($info)
 callSetMargin ($info)
 callStartPageCounter ($info)
 callTable ($params, $text)
 callText ($params)
 callTextBox ($params, $text)
 callTextFrame ($params, $text)
 callTOC ($info)
 dots ($info)
 extractFunction (&$text, $offSet, &$functionName, &$parameters, $type='ezCall')
 extractParameters (&$text, $offSet, &$parameters, $skipFirstChar=false)
 ezInsertBlockFrame ($text, $textParameters)
 ezInsertFrame ($text, $textParameters)
 ezInsertLine ($params)
 eZPDFTable ($paper='a4', $orientation='portrait')
 ezPrvtTableDrawLines ($pos, $gap, $x0, $x1, $y0, $y1, $y2, $col, $inner, $outer, $opt=1)
 ezTable (&$data, $cols='', $title='', $options='')
 ezText ($text, $size=0, $options=array(), $test=0)
 ezWhatPageNumber ($pageNum, $identifier=false)
fixWhitespace (&$text)
 insertFrontpage ($params, $text)
 insertTextBox ($params, $text)
 insertTextFrame ($params, $text)
 insertTOC ($sizeArray=array(20, 18, 16, 14, 12), $indentArray=array(0, 4, 6, 8, 10), $dots=true, $contentText= '', $level=3)
 outputDocSpecification ()
 popStack ()
 pushStack ($continous=true)
 setXOffset ($xOffset)
 setYOffset ($yOffset)
 xOffset ()
 yOffset ()

Public Attributes

 $DocSpecification
 $DocSpecStack = array()
 $ezFrame
 $FrontpageID
 $KeywordArray
 $PageCounter
 $PreStack
 $TOC

Private Member Functions

 eZCalculateColumnWidth ($columnWidthArray, $options, $marginWidth, $minWidthArray, $totalWidth, $fixedSizeArray=array())
 fixupTableCellText ($text)
 headerIndex ($page, $level)
 headerLabel ($page, $level)
 initFrameMargins ()

Detailed Description

eZPDFTable adds extra support for tables

Definition at line 50 of file class.ezpdftable.php.


Member Function Documentation

eZPDFTable::addDocSpecFunction ( functionName,
parameters 
)

Function for adding function to doc specification

param - text to add

Definition at line 2815 of file class.ezpdftable.php.

Referenced by callBlockFrame(), callFrame(), callFrontpage(), callLine(), callTable(), callTextBox(), and callTextFrame().

eZPDFTable::addDocSpecification ( text  ) 

Function for adding text to doc specification

param - text to add

Definition at line 2802 of file class.ezpdftable.php.

Referenced by ezText().

eZPDFTable::addToPreStack ( options = array()  ) 

function for adding font specification to PreStack array

Possible $options setting:

  • justification
  • fontSize
  • fontName

Definition at line 2834 of file class.ezpdftable.php.

Referenced by callFont(), callHeader(), and callText().

eZPDFTable::callAnchor ( info  ) 

Callback function to set anchor

Definition at line 1116 of file class.ezpdftable.php.

eZPDFTable::callBlockFrame ( params,
text 
)

Function for adding footer definition to PDF document. creates call on stack for ezInsertFooter

Parameters:
parameters inside ezGroup Tags

Definition at line 1904 of file class.ezpdftable.php.

eZPDFTable::callCircle ( info  ) 

Draw filled circle

Definition at line 1805 of file class.ezpdftable.php.

eZPDFTable::callDrawLine ( info  ) 

Draw line on current page in PDF document

Definition at line 1937 of file class.ezpdftable.php.

eZPDFTable::callFilledRectangle ( info  ) 

Function for drawing filled rectangle in document

Parameters:
params 

Definition at line 1877 of file class.ezpdftable.php.

eZPDFTable::callFont ( params  ) 

Callback function to set font

Definition at line 1508 of file class.ezpdftable.php.

eZPDFTable::callFrame ( params,
text 
)

Function for adding footer definition to PDF document. creates call on stack for ezInsertFooter

Parameters:
parameters inside ezGroup Tags

Definition at line 1918 of file class.ezpdftable.php.

eZPDFTable::callFrameLine ( info  ) 

Draw line related to a frame.

Definition at line 2883 of file class.ezpdftable.php.

eZPDFTable::callFrameMargins ( info  ) 

Function for setting frame margins. Frames are used to define for example footer and header areas

Parameters:
info,standard ezpdf callback function

Definition at line 1951 of file class.ezpdftable.php.

eZPDFTable::callFrontpage ( params,
text 
)

Function for inserting frontpage into document. Called by ezGroup specification

Parameters:
parameters 
text in ezGroup

Definition at line 2227 of file class.ezpdftable.php.

eZPDFTable::callHeader ( params  ) 

Callback function to set header

Definition at line 1126 of file class.ezpdftable.php.

eZPDFTable::callImage ( info  ) 

Function for insert image

Definition at line 1156 of file class.ezpdftable.php.

eZPDFTable::callIndex ( info  ) 

Definition at line 1405 of file class.ezpdftable.php.

eZPDFTable::callInsertTOC ( info  ) 

function for inserting TOC

Definition at line 1363 of file class.ezpdftable.php.

eZPDFTable::callKeyword ( info  ) 

function for inserting keyword

Definition at line 1339 of file class.ezpdftable.php.

eZPDFTable::callLine ( params,
text 
)

Add line to all pages

Definition at line 1929 of file class.ezpdftable.php.

eZPDFTable::callNewPage ( info  ) 

Callback function for creating new page

Definition at line 1400 of file class.ezpdftable.php.

eZPDFTable::callRectangle ( info  ) 

Function for drawing rectangle in document

Parameters:
parameters 

Definition at line 1660 of file class.ezpdftable.php.

eZPDFTable::callSetMargin ( info  ) 

Set new margins

Definition at line 1742 of file class.ezpdftable.php.

eZPDFTable::callStartPageCounter ( info  ) 

Start page counter in PDF document

Parameters:
counter identifier

Definition at line 2936 of file class.ezpdftable.php.

eZPDFTable::callTable ( params,
text 
)

Function for generating table definition. Called by ezGroup specification

Parameters:
parameters 
text in ezGroup

Definition at line 2274 of file class.ezpdftable.php.

eZPDFTable::callText ( params  ) 

Callback function for adding text

Definition at line 2702 of file class.ezpdftable.php.

eZPDFTable::callTextBox ( params,
text 
)

Insert text at specified position

Definition at line 2547 of file class.ezpdftable.php.

eZPDFTable::callTextFrame ( params,
text 
)

Callback function for adding text frame.

Definition at line 2576 of file class.ezpdftable.php.

eZPDFTable::callTOC ( info  ) 

Callback function for inserting TOC

Definition at line 1383 of file class.ezpdftable.php.

eZPDFTable::dots ( info  ) 

Definition at line 1488 of file class.ezpdftable.php.

eZPDFTable::extractFunction ( &$  text,
offSet,
&$  functionName,
&$  parameters,
type = 'ezCall' 
)

Function for extracting function name and parameters from text.

Parameters:
text 
offset 
function name (reference)
parameters array (reference)
Returns:
end offset of function

Definition at line 2447 of file class.ezpdftable.php.

Referenced by ezText().

eZPDFTable::extractParameters ( &$  text,
offSet,
&$  parameters,
skipFirstChar = false 
)

Function for extracting parameters from : separated key:value list callback functions

Parameters:
text 
offset 
parameters array (reference)
Returns:
end offset of function

Definition at line 2470 of file class.ezpdftable.php.

Referenced by callCircle(), callDrawLine(), callFilledRectangle(), callFrameLine(), callFrameMargins(), callImage(), callRectangle(), callSetMargin(), callStartPageCounter(), callTable(), callTOC(), and extractFunction().

eZPDFTable::eZCalculateColumnWidth ( columnWidthArray,
options,
marginWidth,
minWidthArray,
totalWidth,
fixedSizeArray = array() 
) [private]

Calculate Table column widths

Parameters:
ColumnWidth Array
Table options
Total Width
Margin Width
minimum Table width Array
Position array ( for private use only ).
Returns:
Array of fixed column sizes ( returned )

Definition at line 1040 of file class.ezpdftable.php.

Referenced by ezTable().

eZPDFTable::ezInsertBlockFrame ( text,
textParameters 
)

Insert footer/header into PDF document

Parameters:
text 
text parameters

Definition at line 1990 of file class.ezpdftable.php.

eZPDFTable::ezInsertFrame ( text,
textParameters 
)

Insert footer/header into PDF document

Parameters:
text 
text parameters

Definition at line 2096 of file class.ezpdftable.php.

eZPDFTable::ezInsertLine ( params  ) 

Insert line onto every page

Parameters:
line parameters

Definition at line 1972 of file class.ezpdftable.php.

eZPDFTable::eZPDFTable ( paper = 'a4',
orientation = 'portrait' 
)

Constructor. This class is only used to encapsulate a table.

Definition at line 56 of file class.ezpdftable.php.

eZPDFTable::ezPrvtTableDrawLines ( pos,
gap,
x0,
x1,
y0,
y1,
y2,
col,
inner,
outer,
opt = 1 
)

Reimplemented from Cezpdf.

Definition at line 1086 of file class.ezpdftable.php.

eZPDFTable::ezTable ( &$  data,
cols = '',
title = '',
options = '' 
)

add a table of information to the pdf document $data is a two dimensional array $cols (optional) is an associative array, the keys are the names of the columns from $data to be presented (and in that order), the values are the titles to be given to the columns $title (optional) is the title to be put on the top of the table

$options is an associative array which can contain: 'cellData' => array( <coord> => array( 'size' => array( <width>, <height>), 'justification' => <left|right|center> ), <coord>....) All non specified coords will be threated with default settings. Coord is text, offset 0, ex: '5,6' Coord 'x,0' is table header 'showLines'=> 0,1,2, default is 1 (show outside and top lines only), 2=> lines on each row 'showHeadings' => 0 or 1 'repeatTableHeader' => 0 or 1, if set to 1, the table header will be repeated when a table stretches over multiple pages. ( default 0 ) 'shaded'=> 0,1,2,3 default is 1 (1->alternate lines are shaded, 0->no shading, 2-> both shaded, second uses shadeCol2) 'shadeCol' => (CMYK) array, defining the colour of the shading 'shadeCol2' => (CMYK) array, defining the colour of the shading of the other blocks 'fontSize' => 10 'textCol' => (CMYK) array, text colour 'titleFontSize' => 12 'rowGap' => 2 , the space added at the top and bottom of each row, between the text and the lines 'colGap' => 5 , the space on the left and right sides of each cell 'lineCol' => (r,g,b) array, defining the colour of the lines, default, black. 'xPos' => 'left','right','center','centre',or coordinate, reference coordinate in the x-direction 'xOrientation' => 'left','right','center','centre', position of the table w.r.t 'xPos' 'width'=> <number> which will specify the width of the table, if it turns out to not be this wide, then it will stretch the table to fit, if it is wider then each cell will be made proportionalty smaller, and the content may have to wrap. 'maxWidth'=> <number> similar to 'width', but will only make table smaller than it wants to be 'options' => array(<colname>=>array('justification'=>'left','width'=>100,'link'=>linkDataName),<colname>=>....) allow the setting of other paramaters for the individual columns 'minRowSpace'=> the minimum space between the bottom of each row and the bottom margin, in which a new row will be started if it is less, then a new page would be started, default=-100 'innerLineThickness'=>1 'outerLineThickness'=>1 'splitRows'=>0, 0 or 1, whether or not to allow the rows to be split across page boundaries 'protectRows'=>number, the number of rows to hold with the heading on page, ie, if there less than this number of rows on the page, then move the whole lot onto the next page, default=1

note that the user will have had to make a font selection already or this will not produce a valid pdf file.

Definition at line 177 of file class.ezpdftable.php.

eZPDFTable::ezText ( text,
size = 0,
options = array(),
test = 0 
)

Function overriding the default ezText function for doing preprocessing of text

Reimplemented from Cezpdf.

Definition at line 1558 of file class.ezpdftable.php.

Referenced by callIndex(), ezInsertBlockFrame(), insertFrontpage(), insertTextBox(), insertTOC(), and outputDocSpecification().

eZPDFTable::ezWhatPageNumber ( pageNum,
identifier = false 
)
Parameters:
real page number
pagecounter identifier

Reimplemented from Cezpdf.

Definition at line 2965 of file class.ezpdftable.php.

Referenced by callInsertTOC(), callKeyword(), ezInsertBlockFrame(), and ezInsertFrame().

eZPDFTable::fixupTableCellText ( text  )  [private]

Fixup table cell text. Removes ezCall tags, and first C:callNewLine if they exists.

Parameters:
text 
Returns:
text without ezgroup/ezcall tags

Definition at line 1648 of file class.ezpdftable.php.

Referenced by ezTable().

& eZPDFTable::fixWhitespace ( &$  text  ) 
eZPDFTable::headerIndex ( page,
level 
) [private]

Get header label of content on specified page and specified level

Parameters:
current page
level 

Definition at line 3019 of file class.ezpdftable.php.

eZPDFTable::headerLabel ( page,
level 
) [private]

Get header label of content on specified page and specified level

Parameters:
current page
level 

Definition at line 2989 of file class.ezpdftable.php.

eZPDFTable::initFrameMargins (  )  [private]

Initialize footer and header frame margins. Called by constructor

Definition at line 76 of file class.ezpdftable.php.

Referenced by eZPDFTable().

eZPDFTable::insertFrontpage ( params,
text 
)

Insert front page

Definition at line 2235 of file class.ezpdftable.php.

eZPDFTable::insertTextBox ( params,
text 
)

Definition at line 2552 of file class.ezpdftable.php.

eZPDFTable::insertTextFrame ( params,
text 
)

Callback function for adding text frame.

Definition at line 2584 of file class.ezpdftable.php.

eZPDFTable::insertTOC ( sizeArray = array( 20, 18, 16, 14, 12 ),
indentArray = array( 0, 4, 6, 8, 10 ),
dots = true,
contentText = '',
level = 3 
)

Create Table Of Contents (TOC)

Parameters:
size array, element 0 define size of header level 1, etc.
indent,element 0 define indent of header level 1, etc.
dots,if true, generate dots between name and pagenumber
content text
level,how many header levels to generate toc form

Definition at line 1446 of file class.ezpdftable.php.

Referenced by callTOC().

eZPDFTable::outputDocSpecification (  ) 

Loop through all document specification settings and print specified text

Returns:
new Y offset

Definition at line 2503 of file class.ezpdftable.php.

Referenced by ezText().

eZPDFTable::popStack (  ) 

Pop Specification stack.

Definition at line 2775 of file class.ezpdftable.php.

Referenced by ezInsertBlockFrame(), and insertTextBox().

eZPDFTable::pushStack ( continous = true  ) 

Add and build Stack for function calls and document specification Stack

Parameters:
countinues text, set to false to insert independent frames. DEfault true

Definition at line 2742 of file class.ezpdftable.php.

Referenced by ezInsertBlockFrame(), eZPDFTable(), and insertTextBox().

eZPDFTable::setXOffset ( xOffset  ) 
eZPDFTable::setYOffset ( yOffset  ) 

Definition at line 116 of file class.ezpdftable.php.

Referenced by ezInsertBlockFrame(), insertTextBox(), and popStack().

eZPDFTable::xOffset (  ) 

Get the current X offset

Definition at line 105 of file class.ezpdftable.php.

Referenced by callCircle(), callSetMargin(), insertTextFrame(), and pushStack().

eZPDFTable::yOffset (  ) 

Member Data Documentation

eZPDFTable::$DocSpecification

Definition at line 3051 of file class.ezpdftable.php.

eZPDFTable::$DocSpecStack = array()

Definition at line 3054 of file class.ezpdftable.php.

eZPDFTable::$ezFrame

Definition at line 3047 of file class.ezpdftable.php.

eZPDFTable::$FrontpageID

Definition at line 3045 of file class.ezpdftable.php.

eZPDFTable::$KeywordArray

Definition at line 3042 of file class.ezpdftable.php.

eZPDFTable::$PageCounter

Definition at line 3043 of file class.ezpdftable.php.

eZPDFTable::$PreStack

Definition at line 3050 of file class.ezpdftable.php.

eZPDFTable::$TOC

Definition at line 3041 of file class.ezpdftable.php.


The documentation for this class was generated from the following file:
Generated on Mon Jul 12 07:10:29 2010 for eZ publish by  doxygen 1.6.3