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
void
Error(string $error_message = '')

Displays an error message

from  Pdf
void
download(string $filename)

Sends file as a download to user.

from  Pdf
void
setCMargin(float $c_margin)

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

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

void Error(string $error_message = '')

Displays an error message

Parameters

string $error_message

the error message

Return Value

void

void download(string $filename)

Sends file as a download to user.

Parameters

string $filename

file name

Return Value

void

void setCMargin(float $c_margin)

Sets the value for margins

Parameters

float $c_margin 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