class Pdf extends Pdf (View source)

Extends the "TCPDF" class and helps in developing the structure of PDF Schema Export

Constants

PMA_PDF_FONT

PDF font to use.

Properties

array $footerset from  Pdf
array $alias from  Pdf
int|float $xMin
int|float $yMin
int|float $leftMargin
int|float $topMargin
int|float $scale
$customLinks
array $widths
float $cMargin

Methods

__construct(string $orientation, string $unit, string $paper, int $pageNumber, bool $withDoc, string $db)

Constructs PDF for schema export.

void
Footer()

This function must be named "Footer" to work with the TCPDF library

void
setAlias(string $name, string $value)

Function to set alias which will be expanded on page rendering.

from  Pdf
void
_putpages()

Improved with alias expanding.

from  Pdf
never
Error(mixed $msg = '')

Displays an error message

from  Pdf
void
setCMargin(float $cMargin)

Sets the value for margins

void
setScale(float|int $scale = 1, float|int $xMin = 0, float|int $yMin = 0, float|int $leftMargin = -1, float|int $topMargin = -1)

Sets the scaling factor, defines minimum coordinates and margins

void
cellScale(float|int $w, float|int $h = 0, string $txt = '', mixed $border = 0, int $ln = 0, string $align = '', bool $fill = false, string $link = '')

Outputs a scaled cell

void
lineScale(float $x1, float $y1, float $x2, float $y2)

Draws a scaled line

void
setXyScale(float $x, float $y)

Sets x and y scaled positions

void
setXScale(float $x)

Sets the X scaled positions

void
setFontSizeScale(float $size)

Sets the scaled font size

void
setLineWidthScale(float $width)

Sets the scaled line width

void
Header()

This method is used to render the page header.

void
setWidths(array $w)

Sets widths

void
row(array $data, array $links)

Generates table row.

int
numLines(int $w, string $txt)

Compute number of lines used by a multicell of width w

void
setOffline(bool $value)

Set whether the document is generated from client side DB

string
getOutputData()

No description

Details

__construct(string $orientation, string $unit, string $paper, int $pageNumber, bool $withDoc, string $db)

Constructs PDF for schema export.

Parameters

string $orientation

page orientation

string $unit unit
string $paper

the format used for pages

int $pageNumber

schema page number that is being exported

bool $withDoc

with document dictionary

string $db

the database name

This function must be named "Footer" to work with the TCPDF library

Return Value

void

See also

\PhpMyAdmin\Plugins\Schema\Pdf\PDF::Footer()

void setAlias(string $name, string $value)

Function to set alias which will be expanded on page rendering.

Parameters

string $name

name of the alias

string $value

value of the alias

Return Value

void

void _putpages()

Improved with alias expanding.

Return Value

void

never Error(mixed $msg = '')

Displays an error message

Parameters

mixed $msg

the error message

Return Value

never

void setCMargin(float $cMargin)

Sets the value for margins

Parameters

float $cMargin margin

Return Value

void

void setScale(float|int $scale = 1, float|int $xMin = 0, float|int $yMin = 0, float|int $leftMargin = -1, float|int $topMargin = -1)

Sets the scaling factor, defines minimum coordinates and margins

Parameters

float|int $scale

The scaling factor

float|int $xMin

The minimum X coordinate

float|int $yMin

The minimum Y coordinate

float|int $leftMargin

The left margin

float|int $topMargin

The top margin

Return Value

void

void cellScale(float|int $w, float|int $h = 0, string $txt = '', mixed $border = 0, int $ln = 0, string $align = '', bool $fill = false, string $link = '')

Outputs a scaled cell

Parameters

float|int $w

The cell width

float|int $h

The cell height

string $txt

The text to output

mixed $border

Whether to add borders or not

int $ln

Where to put the cursor once the output is done

string $align

Align mode

bool $fill

Whether to fill the cell with a color or not

string $link Link

Return Value

void

See also

\PhpMyAdmin\Plugins\Schema\Pdf\TCPDF::Cell()

void lineScale(float $x1, float $y1, float $x2, float $y2)

Draws a scaled line

Parameters

float $x1

The horizontal position of the starting point

float $y1

The vertical position of the starting point

float $x2

The horizontal position of the ending point

float $y2

The vertical position of the ending point

Return Value

void

See also

\PhpMyAdmin\Plugins\Schema\Pdf\TCPDF::Line()

void setXyScale(float $x, float $y)

Sets x and y scaled positions

Parameters

float $x

The x position

float $y

The y position

Return Value

void

See also

\PhpMyAdmin\Plugins\Schema\Pdf\TCPDF::setXY()

void setXScale(float $x)

Sets the X scaled positions

Parameters

float $x

The x position

Return Value

void

See also

\PhpMyAdmin\Plugins\Schema\Pdf\TCPDF::setX()

void setFontSizeScale(float $size)

Sets the scaled font size

Parameters

float $size

The font size (in points)

Return Value

void

See also

\PhpMyAdmin\Plugins\Schema\Pdf\TCPDF::setFontSize()

void setLineWidthScale(float $width)

Sets the scaled line width

Parameters

float $width

The line width

Return Value

void

See also

\PhpMyAdmin\Plugins\Schema\Pdf\TCPDF::setLineWidth()

void Header()

This method is used to render the page header.

Return Value

void

See also

\PhpMyAdmin\Plugins\Schema\Pdf\TCPDF::Header()

void setWidths(array $w)

Sets widths

Parameters

array $w

array of widths

Return Value

void

void row(array $data, array $links)

Generates table row.

Parameters

array $data

Data for table

array $links

Links for table cells

Return Value

void

int numLines(int $w, string $txt)

Compute number of lines used by a multicell of width w

Parameters

int $w width
string $txt text

Return Value

int

void setOffline(bool $value)

Set whether the document is generated from client side DB

Parameters

bool $value

whether offline

Return Value

void

string getOutputData()

No description

Return Value

string