Path

ez components / documentation / api reference / latest / document


eZ Components latest

Document: ezcDocumentPdfDefaultTableColumnWidthCalculator

[ Tutorial ] [ Conversion ] [ Styles ] [ Class tree ] [ Element index ] [ ChangeLog ] [ Credits ]

Class: ezcDocumentPdfDefaultTableColumnWidthCalculator

Table column width calculator [source]
Default implementation for a table column width calculator, which is responsible to estimate / guess / calculate sensible column width for a docbook table definition.
Introspects the contents of a table and guesses based on included media and number of words in a cell what a reasonable column width might be.
Since this implementation is mostly based on the count and length of words in one column, it might return unreasonably small column sizes for single columns. This might lead to columns, where not even a single characters fits in, which may cause problems while rendering.

Parents

ezcDocumentPdfTableColumnWidthCalculator
   |
   --ezcDocumentPdfDefaultTableColumnWidthCalculator

Method Summary

public array estimateWidths( $table )
Estimate column widths

Inherited Methods

From ezcDocumentPdfTableColumnWidthCalculator :
public abstract array ezcDocumentPdfTableColumnWidthCalculator::estimateWidths()
Estimate column widths

Methods

estimateWidths

array estimateWidths( $table )
Estimate column widths
Should return an array with the column widths given as float numbers between 0 and 1, which all add together to 1.

Parameters

Name Type Description
$table DOMElement  

Redefinition of

Method Description
ezcDocumentPdfTableColumnWidthCalculator::estimateWidths() Estimate column widths

Last updated: Mon, 21 Dec 2009