eZ Publish Community Project (Legacy Stack) 2013.4
Class

eZPDFTable

class eZPDFTable extends Cezpdf

Constants

NEWLINE

SPACE

TAB

PAGENUM

TOTAL_PAGENUM

HEADER_LEVEL

HEADER_LEVEL_INDEX

Properties

$numObj the current number of pdf objects in the document
$objects this array contains all of the pdf objects, ready for final assembly
$catalogId the objectId (number within the objects array) of the document catalog
$fonts array carrying information about the fonts that the system currently knows about used to ensure that a font is not loaded twice, among other things
$currentFont a record of the current font
$currentBaseFont the current base font
$currentFontNum the number of the current font within the font array
$currentNode
$currentPage object number of the current page
$currentContents object number of the currently active contents block
$numFonts number of fonts within the system
$currentColour current colour for fill operations, defaults to inactive value, all three components should be between 0 and 1 inclusive when active
$currentStrokeColour current colour for stroke operations (lines etc.)
$currentLineStyle current style that lines are drawn in
$stateStack an array which is used to save the state of the document, mainly the colours and styles it is used to temporarily change to another state, the change back to what it was before
$nStateStack number of elements within the state stack
$numPages number of page objects within the document
$stack object Id storage stack
$nStack number of elements within the object Id storage stack
$looseObjects an array which contains information about the objects which are not firmly attached to pages these have been added with the addObject function
$addLooseObjects array contains infomation about how the loose objects are to be added to the document
$infoObject the objectId of the information object for the document this contains authorship, title etc.
$numImages number of images being tracked within the document
$options an array containing options about the document it defaults to turning on the compression of the objects
$firstPageId the objectId of the first page of the document
$wordSpaceAdjust used to track the last used value of the inter-word spacing, this is so that it is known when the spacing is changed.
$procsetObjectId the object Id of the procset object
$fontFamilies store the information about the relationship between font families this used so that the code knows which font is the bold version of another font, etc.
$currentTextState track if the current font is bolded or italicised
$messages messages are stored here during processing, these can be selected afterwards to give some useful debug information
$arc4 the ancryption array for the document encryption is stored here
$arc4_objnum the object Id of the encryption information
$fileIdentifier the file identifier, used to uniquely identify a pdf document
$encrypted a flag to say if a document is to be encrypted or not
$encryptionKey the ancryption key for the encryption of all the document content (structure is not encrypted)
$callback array which forms a stack to keep track of nested callback functions
$nCallback the number of callback functions in the callback array
$destinations store label->id pairs for named destinations, these will be used to replace internal links done this way so that destinations can be defined after the location that links to them
$checkpoint store the stack for the transaction commands, each item in here is a record of the values of all the variables within the class, so that the user can rollback at will (from each 'start' command) note that this includes the objects array, so these can be large.
$textStateStack
$ez
$y
$ezPages
$ezPageCount
$LeftMarginArray
$RightMarginArray
$TOC
$KeywordArray
$PageCounter
$FrontpageID
$ezFrame
$PreStack
$DocSpecification
$DocSpecStack

Methods

Cezpdf($paper = 'a4', $orientation = 'portrait')

from Cezpdf
ezSetCmMargins($top, $bottom, $left, $right)

from Cezpdf
setFontSize($size)

from Cezpdf
setJustification($align)

from Cezpdf
justification()

from Cezpdf
fontSize()

from Cezpdf
ezColumnsStart($options = array())

from Cezpdf
ezColumnsStop()

from Cezpdf
ezInsertMode($status = 1, $pageNum = 1, $pos = 'before')

from Cezpdf
ezNewPage()

from Cezpdf
ezSetMargins($top, $bottom, $left, $right)

from Cezpdf
ezGetCurrentPageNumber()

from Cezpdf
ezStartPageNumbers($x, $y, $size, $pos = 'left', $pattern = '{PAGENUM} of {TOTALPAGENUM}', $num = '')

from Cezpdf
ezWhatPageNumber($pageNum, $identifier = false)

ezStopPageNumbers($stopTotal, $next, $i)

from Cezpdf
ezPRVTpageNumberSearch($lbl, $tmp)

from Cezpdf
ezPRVTaddPageNumbers()

from Cezpdf
ezPRVTcleanUp()

from Cezpdf
ezStream($options = '')

from Cezpdf
ezOutput($options)

from Cezpdf
ezSetY($y)

from Cezpdf
ezSetDy($dy, $mod = '')

from Cezpdf
ezPrvtTableDrawLines($pos, $gap, $x0, $x1, $y0, $y1, $y2, $col, $inner, $outer, $opt = 1)

ezPrvtTableColumnHeadings($cols, $pos, $maxWidth, $height, $decender, $gap, $size, $y, $optionsAll = array())

from Cezpdf
eZGetMaxWordWidth($size, $text)

from Cezpdf
ezPrvtGetTextWidth($size, $text)

from Cezpdf
ezShadedRectangle($x1, $y1, $width, $height, $col1, $col2, $direction = 'vertical')

Draw a shaded rectangle

from Cezpdf
ezProcessText($text)

from Cezpdf
ezText($text, $size, $options = array(), $test)

Function overriding the default ezText function for doing preprocessing of text

ezImage($image, $pad = 5, $width, $resize = 'full', $just = 'center', $border = '')

from Cezpdf
loadTemplate($templateFile)

from Cezpdf
execTemplate($id, $data = array(), $options = array())

from Cezpdf
ilink($info)

from Cezpdf
alink($info, $internal)

from Cezpdf
uline($info)

from Cezpdf
strike($info)

from Cezpdf
lineHeight($options = array())

Get current line height

from Cezpdf
rightMargin($yOffset = false)

from Cezpdf
leftMargin($yOffset = false)

from Cezpdf
setLimitedLeftMargin($startY, $stopY, $leftMargin)

from Cezpdf
setLimitedRightMargin($startY, $stopY, $rightMargin)

from Cezpdf
eZPDFTable($paper = 'a4', $orientation = 'portrait')

Constructor.

initFrameMargins()

yOffset()

Get the current Y offset

xOffset()

Get the current X offset

setYOffset($yOffset)

setXOffset($xOffset)

ezTable($data, $cols = '', $title = '', $options = '')

eZCalculateColumnWidth($columnWidthArray, $options, $marginWidth, $minWidthArray, $totalWidth, $fixedSizeArray = array())

callAnchor($info)

Callback function to set anchor

callHeader($params)

Callback function to set header

callImage($info)

Function for insert image

callKeyword($info)

function for inserting keyword

callInsertTOC($info)

function for inserting TOC

callTOC($info)

Callback function for inserting TOC

callNewPage($info)

Callback function for creating new page

callIndex($info)

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

dots($info)

callFont($params)

Callback function to set font

fixWhitespace($text)

fixupTableCellText($text)

callRectangle($info)

callSetMargin($info)

callCircle($info)

callFilledRectangle($info)

callBlockFrame($params, $text)

callFrame($params, $text)

callLine($params, $text)

callDrawLine($info)

callFrameMargins($info)

ezInsertLine($params)

ezInsertBlockFrame($text, $textParameters)

ezInsertFrame($text, $textParameters)

callFrontpage($params, $text)

insertFrontpage($params, $text)

callTable($params, $text)

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

Function for extracting function name and parameters from text.

extractParameters($text, $offSet, $parameters, $skipFirstChar = false)

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

outputDocSpecification()

Loop through all document specification settings and print specified text

callTextBox($params, $text)

insertTextBox($params, $text)

callTextFrame($params, $text)

insertTextFrame($params, $text)

callText($params)

Callback function for adding text

pushStack($continous = true)

popStack()

addDocSpecification($text)

Function for adding text to doc specification

addDocSpecFunction($functionName, $parameters)

Function for adding function to doc specification

addToPreStack($options = array())

function for adding font specification to PreStack array

callFrameLine($info)

callStartPageCounter($info)

headerLabel($page, $level)

headerIndex($page, $level)

Details

in Cezpdf at line 27
public Cezpdf($paper = 'a4', $orientation = 'portrait')

Parameters

$paper
$orientation

in Cezpdf at line 147
public ezSetCmMargins($top, $bottom, $left, $right)

Parameters

$top
$bottom
$left
$right

in Cezpdf at line 160
public setFontSize($size)

Parameters

$size

in Cezpdf at line 169
public setJustification($align)

Parameters

$align

in Cezpdf at line 178
public justification()

in Cezpdf at line 187
public fontSize()

in Cezpdf at line 194
public ezColumnsStart($options = array())

Parameters

$options

in Cezpdf at line 228
public ezColumnsStop()

in Cezpdf at line 240
public ezInsertMode($status = 1, $pageNum = 1, $pos = 'before')

Parameters

$status
$pageNum
$pos

in Cezpdf at line 260
public ezNewPage()

in Cezpdf at line 315
public ezSetMargins($top, $bottom, $left, $right)

Parameters

$top
$bottom
$left
$right

in Cezpdf at line 340
public ezGetCurrentPageNumber()

in Cezpdf at line 348
public ezStartPageNumbers($x, $y, $size, $pos = 'left', $pattern = '{PAGENUM} of {TOTALPAGENUM}', $num = '')

Parameters

$x
$y
$size
$pos
$pattern
$num

at line 2934
public ezWhatPageNumber($pageNum, $identifier = false)

Parameters

$pageNum
$identifier

in Cezpdf at line 417
public ezStopPageNumbers($stopTotal, $next, $i)

Parameters

$stopTotal
$next
$i

in Cezpdf at line 459
public ezPRVTpageNumberSearch($lbl, $tmp)

Parameters

$lbl
$tmp

in Cezpdf at line 483
public ezPRVTaddPageNumbers()

in Cezpdf at line 577
public ezPRVTcleanUp()

in Cezpdf at line 584
public ezStream($options = '')

Parameters

$options

in Cezpdf at line 592
public ezOutput($options)

Parameters

$options

in Cezpdf at line 600
public ezSetY($y)

Parameters

$y

in Cezpdf at line 614
public ezSetDy($dy, $mod = '')

Parameters

$dy
$mod

at line 1059
public ezPrvtTableDrawLines($pos, $gap, $x0, $x1, $y0, $y1, $y2, $col, $inner, $outer, $opt = 1)

Parameters

$pos
$gap
$x0
$x1
$y0
$y1
$y2
$col
$inner
$outer
$opt

in Cezpdf at line 677
public ezPrvtTableColumnHeadings($cols, $pos, $maxWidth, $height, $decender, $gap, $size, $y, $optionsAll = array())

Parameters

$cols
$pos
$maxWidth
$height
$decender
$gap
$size
$y
$optionsAll

in Cezpdf at line 762
public eZGetMaxWordWidth($size, $text)

Parameters

$size
$text

in Cezpdf at line 778
public ezPrvtGetTextWidth($size, $text)

Parameters

$size
$text

in Cezpdf at line 808
public ezShadedRectangle($x1, $y1, $width, $height, $col1, $col2, $direction = 'vertical')

Draw a shaded rectangle

direction is optional and set to vertical by default

\param x1
\param y1
\param width
\param height
\param col1
\param col2
\param direction ('vertical', 'horizontal', or angle)

Parameters

$x1
$y1
$width
$height
$col1
$col2
$direction

in Cezpdf at line 820
public ezProcessText($text)

Parameters

$text

at line 1529
public ezText($text, $size, $options = array(), $test)

Function overriding the default ezText function for doing preprocessing of text

Parameters

$text
$size
$options
$test

in Cezpdf at line 1020
public ezImage($image, $pad = 5, $width, $resize = 'full', $just = 'center', $border = '')

Parameters

$image
$pad
$width
$resize
$just
$border

in Cezpdf at line 1151
public loadTemplate($templateFile)

Parameters

$templateFile

in Cezpdf at line 1196
public execTemplate($id, $data = array(), $options = array())

Parameters

$id
$data
$options

Parameters

$info

Parameters

$info
$internal

in Cezpdf at line 1270
public uline($info)

Parameters

$info

in Cezpdf at line 1315
public strike($info)

Parameters

$info

in Cezpdf at line 1359
public lineHeight($options = array())

Get current line height

Parameters

$options

in Cezpdf at line 1392
public rightMargin($yOffset = false)

Parameters

$yOffset

in Cezpdf at line 1417
public leftMargin($yOffset = false)

Parameters

$yOffset

in Cezpdf at line 1446
public setLimitedLeftMargin($startY, $stopY, $leftMargin)

Parameters

$startY
$stopY
$leftMargin

in Cezpdf at line 1460
public setLimitedRightMargin($startY, $stopY, $rightMargin)

Parameters

$startY
$stopY
$rightMargin

at line 31
public eZPDFTable($paper = 'a4', $orientation = 'portrait')

Constructor.

This class is only used to encapsulate a table.

Parameters

$paper
$orientation

at line 51
public initFrameMargins()

at line 72
public yOffset()

Get the current Y offset

at line 80
public xOffset()

Get the current X offset

at line 91
public setYOffset($yOffset)

Parameters

$yOffset

at line 96
public setXOffset($xOffset)

Parameters

$xOffset

at line 152
public ezTable($data, $cols = '', $title = '', $options = '')

Parameters

$data
$cols
$title
$options

at line 1013
public eZCalculateColumnWidth($columnWidthArray, $options, $marginWidth, $minWidthArray, $totalWidth, $fixedSizeArray = array())

Parameters

$columnWidthArray
$options
$marginWidth
$minWidthArray
$totalWidth
$fixedSizeArray

at line 1089
public callAnchor($info)

Callback function to set anchor

Parameters

$info

at line 1099
public callHeader($params)

Callback function to set header

Parameters

$params

at line 1129
public callImage($info)

Function for insert image

Parameters

$info

at line 1310
public callKeyword($info)

function for inserting keyword

Parameters

$info

at line 1334
public callInsertTOC($info)

function for inserting TOC

Parameters

$info

at line 1354
public callTOC($info)

Callback function for inserting TOC

Parameters

$info

at line 1371
public callNewPage($info)

Callback function for creating new page

Parameters

$info

at line 1376
public callIndex($info)

Parameters

$info

at line 1417
public insertTOC($sizeArray = array(20, 18, 16, 14, 12), $indentArray = array(0, 4, 6, 8, 10), $dots = true, $contentText = '', $level = 3)

Parameters

$sizeArray
$indentArray
$dots
$contentText
$level

at line 1459
public dots($info)

Parameters

$info

at line 1479
public callFont($params)

Callback function to set font

Parameters

$params

at line 1514
public fixWhitespace($text)

Parameters

$text

at line 1619
public fixupTableCellText($text)

Parameters

$text

at line 1631
public callRectangle($info)

Parameters

$info

at line 1713
public callSetMargin($info)

Parameters

$info

at line 1776
public callCircle($info)

Parameters

$info

at line 1848
public callFilledRectangle($info)

Parameters

$info

at line 1875
public callBlockFrame($params, $text)

Parameters

$params
$text

at line 1889
public callFrame($params, $text)

Parameters

$params
$text

at line 1900
public callLine($params, $text)

Parameters

$params
$text

at line 1908
public callDrawLine($info)

Parameters

$info

at line 1922
public callFrameMargins($info)

Parameters

$info

at line 1943
public ezInsertLine($params)

Parameters

$params

at line 1961
public ezInsertBlockFrame($text, $textParameters)

Parameters

$text
$textParameters

at line 2067
public ezInsertFrame($text, $textParameters)

Parameters

$text
$textParameters

at line 2198
public callFrontpage($params, $text)

Parameters

$params
$text

at line 2206
public insertFrontpage($params, $text)

Parameters

$params
$text

at line 2245
public callTable($params, $text)

Parameters

$params
$text

at line 2418
public extractFunction($text, $offSet, $functionName, $parameters, $type = 'ezCall')

Function for extracting function name and parameters from text.

\param text \param offset \param function name (reference) \param parameters array (reference)

\return end offset of function

Parameters

$text
$offSet
$functionName
$parameters
$type

at line 2441
public extractParameters($text, $offSet, $parameters, $skipFirstChar = false)

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

\param text \param offset \param parameters array (reference)

\return end offset of function

Parameters

$text
$offSet
$parameters
$skipFirstChar

at line 2474
public outputDocSpecification()

Loop through all document specification settings and print specified text

\return new Y offset

at line 2518
public callTextBox($params, $text)

Parameters

$params
$text

at line 2523
public insertTextBox($params, $text)

Parameters

$params
$text

at line 2547
public callTextFrame($params, $text)

Parameters

$params
$text

at line 2555
public insertTextFrame($params, $text)

Parameters

$params
$text

at line 2673
public callText($params)

Callback function for adding text

Parameters

$params

at line 2713
public pushStack($continous = true)

Parameters

$continous

at line 2745
public popStack()

at line 2772
public addDocSpecification($text)

Function for adding text to doc specification

param - text to add

Parameters

$text

at line 2785
public addDocSpecFunction($functionName, $parameters)

Function for adding function to doc specification

param - text to add

Parameters

$functionName
$parameters

at line 2804
public addToPreStack($options = array())

function for adding font specification to PreStack array

Possible $options setting: - justification - fontSize - fontName

Parameters

$options

at line 2853
public callFrameLine($info)

Parameters

$info

at line 2906
public callStartPageCounter($info)

Parameters

$info

at line 2958
public headerLabel($page, $level)

Parameters

$page
$level

at line 2988
public headerIndex($page, $level)

Parameters

$page
$level