Documentation

PDF
in package

A Laravel wrapper for Dompdf

Tags
author

Barry vd. Heuvel

Table of Contents

$config  : Repository
$dompdf  : Dompdf
$files  : Filesystem
$public_path  : mixed
$rendered  : mixed
$showWarnings  : mixed
$view  : Factory
__construct()  : mixed
addInfo()  : static
Add metadata info
download()  : Response
Make the PDF downloadable by the user
getDomPDF()  : Dompdf
Get the DomPDF instance
loadFile()  : static
Load a HTML file
loadHTML()  : static
Load a HTML string
loadView()  : static
Load a View and convert to HTML
output()  : string
Output the PDF as a string.
save()  : static
Save the PDF to a file
setEncryption()  : mixed
setOptions()  : static
Set/Change an option in DomPdf
setPaper()  : $this
Set the paper size (default A4)
setWarnings()  : $this
Show or hide warnings
stream()  : Response
Return a response with the PDF to show in the browser
convertEntities()  : mixed
render()  : mixed
Render the PDF

Properties

$public_path

protected mixed $public_path

$rendered

protected mixed $rendered = false

$showWarnings

protected mixed $showWarnings

Methods

addInfo()

Add metadata info

public addInfo(array<string|int, mixed> $info) : static
Parameters
$info : array<string|int, mixed>
Return values
static

download()

Make the PDF downloadable by the user

public download([string $filename = 'document.pdf' ]) : Response
Parameters
$filename : string = 'document.pdf'
Return values
Response

getDomPDF()

Get the DomPDF instance

public getDomPDF() : Dompdf
Return values
Dompdf

loadFile()

Load a HTML file

public loadFile(string $file) : static
Parameters
$file : string
Return values
static

loadHTML()

Load a HTML string

public loadHTML(string $string[, string $encoding = null ]) : static
Parameters
$string : string
$encoding : string = null

Not used yet

Return values
static

loadView()

Load a View and convert to HTML

public loadView(string $view[, array<string|int, mixed> $data = array() ][, array<string|int, mixed> $mergeData = array() ][, string $encoding = null ]) : static
Parameters
$view : string
$data : array<string|int, mixed> = array()
$mergeData : array<string|int, mixed> = array()
$encoding : string = null

Not used yet

Return values
static

output()

Output the PDF as a string.

public output() : string
Return values
string

The rendered PDF as string

save()

Save the PDF to a file

public save( $filename) : static
Parameters
$filename :
Return values
static

setEncryption()

public setEncryption(mixed $password) : mixed
Parameters
$password : mixed
Return values
mixed

setOptions()

Set/Change an option in DomPdf

public setOptions(array<string|int, mixed> $options) : static
Parameters
$options : array<string|int, mixed>
Return values
static

setPaper()

Set the paper size (default A4)

public setPaper(string $paper[, string $orientation = 'portrait' ]) : $this
Parameters
$paper : string
$orientation : string = 'portrait'
Return values
$this

setWarnings()

Show or hide warnings

public setWarnings(bool $warnings) : $this
Parameters
$warnings : bool
Return values
$this

stream()

Return a response with the PDF to show in the browser

public stream([string $filename = 'document.pdf' ]) : Response
Parameters
$filename : string = 'document.pdf'
Return values
Response

convertEntities()

protected convertEntities(mixed $subject) : mixed
Parameters
$subject : mixed
Return values
mixed

render()

Render the PDF

protected render() : mixed
Return values
mixed

Search results