Overview

Packages

  • Admin
  • Archive
  • Common
  • DB
  • Express
  • Form
  • Layout
  • Mailer
  • None
  • OpenHomeoDB
  • PDF
    • MC
  • Process
  • Rep
  • RevRep
  • SaveReps
  • Search
  • Session
  • SymRem
  • TreeView
  • UserDB

Classes

  • PDF_MC_Table
  • Overview
  • Package
  • Class
  • Tree

Class PDF_MC_Table

The PDF_MC_Table class extends FPDF for creating tables with MultiCells.

The goal of this class is to build a table from MultiCells. As MultiCells go to the next line after being output, the base idea consists in saving the current position, printing the MultiCell and resetting the position to its right. There is a difficulty, however, if the table is too long: page breaks. Before outputting a row, it is necessary to know whether it will cause a break or not. If it does overflow, a manual page break must be done first. To do so, the height of the row must be known in advance; it is the maximum of the heights of the MultiCells it is made up of. To know the height of a MultiCell, the NbLines() method is used: it returns the number of lines a MultiCell will occupy.

FPDF
Extended by PDF_MC_Table

Direct known subclasses

PDF
Package: PDF\MC
Category: PDF
Author: Olivier <olivier@fpdf.org>
Author: Henri Schumacher <henri.hulski@gazeta.pl>
Located at include/classes/fpdf/mc_table.php
Methods summary
public
# SetWidths( array $w )

Set the array of column widths

Set the array of column widths

Parameters

$w
array
$w column widths array
public
# SetAligns( array|string $a )

Set the array of column alignments or one alignment for all columns

Set the array of column alignments or one alignment for all columns

Parameters

$a
array|string
$a column alignments array or one alignment for all columns
public
# SetCellHeight( number $ch )

Set the cell height

Set the cell height

Parameters

$ch
number
$ch cell height
public
# SetFill( boolean $f )

Set if the row should be colored

Set if the row should be colored

Parameters

$f
boolean
$f true if the table row should be colored
public boolean
# Row( array $data )

Print a row if no page break is needed

Print a row if no page break is needed

Parameters

$data
array
$data contains the row data

Returns

boolean
true if success, false if page break is needed
public boolean
# CheckPageBreak( number $h )

Check if page break is needed

Check if page break is needed

Parameters

$h
number
$h the height of the row

Returns

boolean
true if a page break is needed
public integer
# NbLines( number $w, string $txt )

Computes the number of lines a MultiCell of width w will take

Computes the number of lines a MultiCell of width w will take

Parameters

$w
number
$w cell width
$txt
string
$txt cell text

Returns

integer
number of lines a MultiCell of width w will take
Methods inherited from FPDF
AcceptPageBreak(), AddFont(), AddLink(), AddPage(), AliasNbPages(), Cell(), Close(), Error(), FPDF(), Footer(), GetStringWidth(), GetX(), GetY(), Header(), Image(), Line(), Link(), Ln(), MultiCell(), Open(), Output(), PageNo(), Rect(), SetAuthor(), SetAutoPageBreak(), SetCompression(), SetCreator(), SetDisplayMode(), SetDrawColor(), SetFillColor(), SetFont(), SetFontSize(), SetKeywords(), SetLeftMargin(), SetLineWidth(), SetLink(), SetMargins(), SetRightMargin(), SetSubject(), SetTextColor(), SetTitle(), SetTopMargin(), SetX(), SetXY(), SetY(), Text(), Write(), _UTF8toUTF16(), _beginpage(), _checkoutput(), _dochecks(), _dounderline(), _enddoc(), _endpage(), _escape(), _getpagesize(), _loadfont(), _newobj(), _out(), _parsegif(), _parsejpg(), _parsepng(), _parsepngstream(), _putcatalog(), _putfonts(), _putheader(), _putimage(), _putimages(), _putinfo(), _putpages(), _putresourcedict(), _putresources(), _putstream(), _puttrailer(), _putxobjectdict(), _readint(), _readstream(), _textstring()
Properties summary
public array $widths
#

The array of column widths

The array of column widths

public array|string $aligns
#

The array of column alignments or one alignment for all columns

The array of column alignments or one alignment for all columns

public number $cell_height 6
#

The cell height

The cell height

public boolean $fill false
#

True if the table row should be colored

True if the table row should be colored

public integer $table_page 1
#

The page number

The page number

Properties inherited from FPDF
$AliasNbPages, $AutoPageBreak, $ColorFlag, $CoreFonts, $CurOrientation, $CurPageSize, $CurrentFont, $DefOrientation, $DefPageSize, $DrawColor, $FillColor, $FontFamily, $FontFiles, $FontSize, $FontSizePt, $FontStyle, $InFooter, $InHeader, $LayoutMode, $LineWidth, $PDFVersion, $PageBreakTrigger, $PageLinks, $PageSizes, $StdPageSizes, $TextColor, $ZoomMode, $author, $bMargin, $buffer, $cMargin, $compress, $creator, $diffs, $fontpath, $fonts, $h, $hPt, $images, $k, $keywords, $lMargin, $lasth, $links, $n, $offsets, $page, $pages, $rMargin, $state, $subject, $tMargin, $title, $underline, $w, $wPt, $ws, $x, $y
OpenHomeopath PHP code documentation API documentation generated by ApiGen 2.8.0