Plugins

# Class: CwFpdf Source Location: /plugins/exportPdf/client/CwFpdf.php
### Class Overview
FPDF implementation of PdfWriter. | ### Variables $angle $blocks $format $general $legendLevel $legendShift $log $maxExtent $p $space | ### Methods __construct addGfxBlock addImage addLegend addLegendItem addNorthArrow addPage addTable addTableCaption addTableCell addTableHeaders addTableRow addTextBlock closePage convertCharset finalizeDocument getCharset getPageHeight getPageWidth getTextAlign initializeDocument rotate setBoxLayout setDrawColor setFillColor setLineWidth setTableMeta setTableWidth setTextLayout splitMultiPageTable
### Class Details [line 162] FPDF implementation of PdfWriter. [ Top ] ### Class Variables #### $angle = 0 [line 214] Angle for method rotate() #### Tags:
access: | protected
Type: | float
[ Top ] #### $blocks = [line 193] #### Tags:
access: | protected
Type: | array
[ Top ] #### $format = [line 183] #### Tags:
access: | protected
Type: | PdfFormat
[ Top ] #### $general = [line 178] #### Tags:
access: | protected
Type: | PdfGeneral
[ Top ] #### $legendLevel = [line 203] #### Tags:
access: | protected
Type: | int
[ Top ] #### $legendShift = [line 208] #### Tags:
access: | protected
Type: | float
[ Top ] #### $log = [line 167] #### Tags:
access: | private
Type: | Logger
[ Top ] #### $maxExtent = [line 198] #### Tags:
access: | protected
Type: | array
[ Top ] #### $p = [line 173] PDF engine object (FPDF) #### Tags:
access: | protected
Type: | cFPDF
[ Top ] #### $space = [line 188] #### Tags:
access: | protected
Type: | SpaceManager
[ Top ] ### Class Methods ### constructor __construct [line 220]
`CwFpdf __construct( ClientExportPdf $export)`
Constructor. #### Tags:
access: | public
#### Parameters:
ClientExportPdf | $export |
[ Top ] ### method addGfxBlock [line 502]
`void addGfxBlock( PdfBlock $block)`
#### Tags:
access: | public
see: | PdfWriter::addGfxBlock()
#### Parameters:
PdfBlock | $block | graphical (image, PDF) block object
[ Top ] ### method addImage [line 1000]
`void addImage( string $file, int $x, int $y, int $w, int $h, [string $type = ''], [string $link = ''])`
Wraps FPDF Image() method and feeds it whith a local copy of argument image if: allowed in exportPdf.ini (general.importRemotePng parameter) file is called through URL file format is PNG #### Tags:
access: | protected
#### Parameters:
string | $file | name of the image file
int | $x | abscissa of the upper-left corner
int | $y | ordinate of the upper-left corner
int | $w | image width
int | $h | image height
string | $type | JPG|JPEG|PNG, detected if left blank
string | $link | URL or FPDF resource (see FPDF doc)
[ Top ] ### method addLegend [line 907]
`void addLegend( PdfBlock $block)`
#### Tags:
access: | public
see: | PdfWriter::addLegend()
#### Parameters:
PdfBlock | $block |
[ Top ] ### method addLegendItem [line 797]
`void addLegendItem( PdfBlock $block, array $layer)`
Draws a legend element (icon + caption) line. #### Tags:
access: | protected
#### Parameters:
PdfBlock | $block | legend block
array | $layer | legend element data
[ Top ] ### method addNorthArrow [line 963]
`void addNorthArrow( PdfBlock $block, mixed $angle)`
#### Tags:
access: | public
see: | PdfWriter::addLegend()
#### Parameters:
PdfBlock | $block |
[ Top ] ### method addPage [line 293]
`void addPage( )`
#### Tags:
access: | public
see: | PdfWriter::addPage()
[ Top ] ### method addTable [line 737]
`void addTable( PdfBlock $block)`
#### Tags:
access: | public
see: | PdfWriter::addTable()
#### Parameters:
PdfBlock | $block |
[ Top ] ### method addTableCaption [line 594]
`void addTableCaption( TableElement $table)`
Draws table title row (cf. HTML caption element). #### Tags:
access: | protected
#### Parameters:
TableElement | $table |
[ Top ] ### method addTableCell [line 530]
`void addTableCell( string $text, float $width, float $height)`
#### Tags:
access: | public
see: | PdfWriter::addTableCell()
#### Parameters:
string | $text | textual content
float | $width | width
float | $height | height
[ Top ] ### method addTableHeaders [line 618]
`void addTableHeaders( TableElement $table)`
Draws table columns headers (columns titles) row. #### Tags:
access: | protected
#### Parameters:
TableElement | $table |
[ Top ] ### method addTableRow [line 567]
`void addTableRow( PdfBlock $block, TableElement $table, array $row)`
#### Tags:
access: | public
see: | PdfWriter::addTableRow()
#### Parameters:
PdfBlock | $block |
TableElement | $table |
array | $row | row data
[ Top ] ### method addTextBlock [line 401]
`void addTextBlock( PdfBlock $block)`
#### Tags:
access: | public
see: | PdfWriter::addTextBlock()
#### Parameters:
PdfBlock | $block | text block object
[ Top ] ### method closePage [line 1034]
`void closePage( )`
Performs recurrent actions (blocks displaying...) before current page is closed. #### Tags:
access: | protected
[ Top ] ### method convertCharset [line 1075]
`string convertCharset( string $string)`
Converts UTF8 strings in Latin1 #### Tags:
return: | converted string
access: | protected
#### Parameters:
string | $string | string to convert
[ Top ] ### method finalizeDocument [line 1065]
`void finalizeDocument( )`
#### Tags:
access: | public
see: | PdfWriter::finalizeDocument()
[ Top ] ### method getCharset [line 1086]
`void getCharset( )`
Returns used character set name. #### Tags:
access: | public
[ Top ] ### method getPageHeight [line 276]
`float getPageHeight( )`
#### Tags:
access: | public
see: | PdfWriter::getPageHeight()
[ Top ] ### method getPageWidth [line 268]
`float getPageWidth( )`
#### Tags:
access: | public
see: | PdfWriter::getPageWidth()
[ Top ] ### method getTextAlign [line 304]
`string getTextAlign( string $align)`
Translates config text-alignement keyword into FPDF one. #### Tags:
return: | enum('C', 'R', 'L')
access: | protected
#### Parameters:
string | $align | horizontal alignment keyword
[ Top ] ### method initializeDocument [line 283]
`void initializeDocument( )`
#### Tags:
access: | public
see: | PdfWriter::initializeDocument()
[ Top ] ### method rotate [line 374]
`void rotate( float $angle, [float $x = -1], [float $y = -1])`
Sets rotation #### Tags:
access: | protected
#### Parameters:
float | $angle |
float | $x |
float | $y |
[ Top ] ### method setBoxLayout [line 361]
`void setBoxLayout( PdfBlock $block)`
Sets block container styles (border width and color, background color). #### Tags:
access: | protected
#### Parameters:
PdfBlock | $block |
[ Top ] ### method setDrawColor [line 316]
`void setDrawColor( mixed $color)`
Sets lines color. #### Tags:
access: | protected
#### Parameters:
mixed | $color | color info (keyword, hex code, RGB array)
[ Top ] ### method setFillColor [line 326]
`void setFillColor( mixed $color)`
Sets filling color (background). #### Tags:
access: | protected
#### Parameters:
mixed | $color | color info (keyword, hex code, RGB array)
[ Top ] ### method setLineWidth [line 335]
`void setLineWidth( float $width)`
Sets line width in PdfGeneral dist_unit. #### Tags:
access: | protected
#### Parameters:
float | $width |
[ Top ] ### method setTableMeta [line 631]
`void setTableMeta( PdfBlock $block, TableElement $table, string $meta)`
Sets table caption or headers blocks. #### Tags:
access: | protected
#### Parameters:
PdfBlock | $block | main table block
TableElement | $table |
string | $meta | type of table block (headers|caption)
[ Top ] ### method setTableWidth [line 650]
`void setTableWidth( PdfBlock $block, TableElement $table)`
Computes table columns widths using cells contents widths. #### Tags:
access: | protected
#### Parameters:
PdfBlock | $block |
TableElement | $table |
[ Top ] ### method setTextLayout [line 346]
`void setTextLayout( PdfBlock $block)`
Sets text styles (font, underline, bold, italic, color). #### Tags:
access: | protected
#### Parameters:
PdfBlock | $block |
[ Top ] ### method splitMultiPageTable [line 545]
`boolean splitMultiPageTable( PdfBlock $block, float $height)`
If there is not enough space to add a table row, adds a new page. #### Tags:
return: | true if new page added, else false
access: | protected
#### Parameters:
PdfBlock | $block |
float | $height | height of next row
[ Top ] Documentation generated on Fri, 21 Sep 2007 13:30:44 +0200 by phpDocumentor 1.3.0RC3