Zeta Components - high quality PHP components

Zeta Components Manual :: Docs For Class ezcDocumentPdfDefaultTableColumnWidthCalculator

Document::ezcDocumentPdfDefaultTableColumnWidthCalculator

Class ezcDocumentPdfDefaultTableColumnWidthCalculator

Table column width calculator

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.

Source for this file: /Document/src/document/pdf/default_table_column_width_calculator.php

ezcDocumentPdfTableColumnWidthCalculator
   |
   --ezcDocumentPdfDefaultTableColumnWidthCalculator
Version:   //autogen//

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
Documentation generated by phpDocumentor 1.4.3