Documentation

PDF
in package

Class PDF.

Table of Contents

$charset  : mixed
$fileName  : mixed
$footer  : mixed
$header  : mixed
$html  : mixed
$library  : mixed
$pdf  : mixed
export()  : mixed
Export record to PDF file.
getFileName()  : string
Get pdf filename.
getInputCharset()  : string
Get input charset.
getPdf()  : mixed
Returns pdf library object.
loadHTML()  : $this
Load HTML content for exporting to PDF.
output()  : mixed
Output content to PDF.
parseParams()  : $this
Parse and set options.
setAuthor()  : $this
Set Title of the document.
setBottomMargin()  : $this
Set bottom margin.
setCreator()  : $this
Set Title of the document.
setFileName()  : $this
Set pdf filename.
setFont()  : $this
Set font.
setFooter()  : $this
Set footer content.
setFooterMargin()  : $this
Set footer margin.
setHeader()  : $this
Set header content.
setHeaderMargin()  : $this
Set header margin.
setInputCharset()  : $this
Set input charset.
setKeywords()  : $this
Set Title of the document.
setLeftMargin()  : $this
Set left margin.
setMargins()  : $this
Set document margins.
setPageSize()  : $this
Set page size and orientation.
setRightMargin()  : $this
Set right margin.
setSubject()  : $this
Set Title of the document.
setTitle()  : $this
Set Title of the document.
setTopMargin()  : $this
Set top margin.
setWatermark()  : $this
Set watermark.

Properties

$charset

protected mixed $charset

$fileName

protected mixed $fileName
protected mixed $footer

$header

protected mixed $header

$html

protected mixed $html

$library

protected mixed $library

$pdf

protected mixed $pdf

Methods

export()

Export record to PDF file.

public abstract export(int $recordId, int $templateId[, string $filePath = '' ][, string $saveFlag = '' ]) : mixed
Parameters
$recordId : int
  • record
$templateId : int
  • id of pdf template
$filePath : string = ''
  • path name for saving pdf file
$saveFlag : string = ''
  • save option flag
Return values
mixed

getFileName()

Get pdf filename.

public getFileName() : string
Return values
string

getInputCharset()

Get input charset.

public abstract getInputCharset() : string
Return values
string

getPdf()

Returns pdf library object.

public abstract getPdf() : mixed
Return values
mixed

loadHTML()

Load HTML content for exporting to PDF.

public abstract loadHTML(string $html) : $this
Parameters
$html : string
Return values
$this

output()

Output content to PDF.

public abstract output() : mixed
Return values
mixed

parseParams()

Parse and set options.

public abstract parseParams(array<string|int, mixed> $params) : $this
Parameters
$params : array<string|int, mixed>
Return values
$this

setAuthor()

Set Title of the document.

public abstract setAuthor(string $author) : $this
Parameters
$author : string
Return values
$this

setBottomMargin()

Set bottom margin.

public abstract setBottomMargin(float $margin) : $this
Parameters
$margin : float
Return values
$this

setCreator()

Set Title of the document.

public abstract setCreator(string $creator) : $this
Parameters
$creator : string
Return values
$this

setFileName()

Set pdf filename.

public setFileName(string $fileName) : $this
Parameters
$fileName : string
Return values
$this

setFont()

Set font.

public abstract setFont(string $family, int $size) : $this
Parameters
$family : string
$size : int
Return values
$this

setFooter()

Set footer content.

public abstract setFooter(string $footerHtml) : $this
Parameters
$footerHtml : string
Return values
$this

setFooterMargin()

Set footer margin.

public abstract setFooterMargin(float $margin) : $this
Parameters
$margin : float
Return values
$this

setHeader()

Set header content.

public abstract setHeader(string $headerHtml) : $this
Parameters
$headerHtml : string
Return values
$this

setHeaderMargin()

Set header margin.

public abstract setHeaderMargin(float $margin) : $this
Parameters
$margin : float
Return values
$this

setInputCharset()

Set input charset.

public abstract setInputCharset(string $charset) : $this
Parameters
$charset : string
Return values
$this

setKeywords()

Set Title of the document.

public abstract setKeywords(array<string|int, string> $keywords) : $this
Parameters
$keywords : array<string|int, string>
Return values
$this

setLeftMargin()

Set left margin.

public abstract setLeftMargin(float $margin) : $this
Parameters
$margin : float
Return values
$this

setMargins()

Set document margins.

public abstract setMargins(array<string|int, mixed> $margins) : $this
Parameters
$margins : array<string|int, mixed>

['top'=>40,'bottom'=>40,'left'=>30,'right'=>30,'header'=>10,'footer'=>10]

Return values
$this

setPageSize()

Set page size and orientation.

public abstract setPageSize(string $format[, string $orientation = null ]) : $this
Parameters
$format : string
$orientation : string = null
Return values
$this

setRightMargin()

Set right margin.

public abstract setRightMargin(float $margin) : $this
Parameters
$margin : float
Return values
$this

setSubject()

Set Title of the document.

public abstract setSubject(string $subject) : $this
Parameters
$subject : string
Return values
$this

setTitle()

Set Title of the document.

public abstract setTitle(string $title) : $this
Parameters
$title : string
Return values
$this

setTopMargin()

Set top margin.

public abstract setTopMargin(float $margin) : $this
Parameters
$margin : float
Return values
$this

setWatermark()

Set watermark.

public abstract setWatermark(string $watermark) : $this
Parameters
$watermark : string
Return values
$this

        

Search results