PHP Class Barryvdh\DomPDF\PDF

Author: Barry vd. Heuvel
Afficher le fichier Open project: barryvdh/laravel-dompdf Class Usage Examples

Protected Properties

Свойство Type Description
$config Illuminate\Contracts\Config\Repository
$dompdf Dompdf\Dompdf
$files Illuminate\Filesystem\Filesystem
$orientation
$paper
$public_path
$rendered
$showWarnings
$view Illuminate\Contracts\View\Factory

Méthodes publiques

Méthode Description
__construct ( Dompdf\Dompdf $dompdf, Illuminate\Contracts\Config\Repository $config, Illuminate\Filesystem\Filesystem $files, Illuminate\Contracts\View\Factory $view )
download ( string $filename = 'document.pdf' ) : Illuminate\Http\Response Make the PDF downloadable by the user
getDomPDF ( ) : Dompdf\Dompdf Get the DomPDF instance
loadFile ( string $file ) : static Load a HTML file
loadHTML ( string $string, string $encoding = null ) : static Load a HTML string
loadView ( string $view, array $data = [], array $mergeData = [], string $encoding = null ) : static Load a View and convert to HTML
output ( ) : string Output the PDF as a string.
save ( $filename ) : static Save the PDF to a file
setOptions ( array $options ) : static Set/Change an option in DomPdf
setPaper ( string $paper, string $orientation = 'portrait' ) Set the paper size (default A4)
setWarnings ( boolean $warnings ) Show or hide warnings
stream ( string $filename = 'document.pdf' ) : Illuminate\Http\Response Return a response with the PDF to show in the browser

Méthodes protégées

Méthode Description
convertEntities ( $subject )
render ( ) Render the PDF

Method Details

__construct() public méthode

public __construct ( Dompdf\Dompdf $dompdf, Illuminate\Contracts\Config\Repository $config, Illuminate\Filesystem\Filesystem $files, Illuminate\Contracts\View\Factory $view )
$dompdf Dompdf\Dompdf
$config Illuminate\Contracts\Config\Repository
$files Illuminate\Filesystem\Filesystem
$view Illuminate\Contracts\View\Factory

convertEntities() protected méthode

protected convertEntities ( $subject )

download() public méthode

Make the PDF downloadable by the user
public download ( string $filename = 'document.pdf' ) : Illuminate\Http\Response
$filename string
Résultat Illuminate\Http\Response

getDomPDF() public méthode

Get the DomPDF instance
public getDomPDF ( ) : Dompdf\Dompdf
Résultat Dompdf\Dompdf

loadFile() public méthode

Load a HTML file
public loadFile ( string $file ) : static
$file string
Résultat static

loadHTML() public méthode

Load a HTML string
public loadHTML ( string $string, string $encoding = null ) : static
$string string
$encoding string Not used yet
Résultat static

loadView() public méthode

Load a View and convert to HTML
public loadView ( string $view, array $data = [], array $mergeData = [], string $encoding = null ) : static
$view string
$data array
$mergeData array
$encoding string Not used yet
Résultat static

output() public méthode

Output the PDF as a string.
public output ( ) : string
Résultat string The rendered PDF as string

render() protected méthode

Render the PDF
protected render ( )

save() public méthode

Save the PDF to a file
public save ( $filename ) : static
$filename
Résultat static

setOptions() public méthode

Set/Change an option in DomPdf
public setOptions ( array $options ) : static
$options array
Résultat static

setPaper() public méthode

Set the paper size (default A4)
public setPaper ( string $paper, string $orientation = 'portrait' )
$paper string
$orientation string

setWarnings() public méthode

Show or hide warnings
public setWarnings ( boolean $warnings )
$warnings boolean

stream() public méthode

Return a response with the PDF to show in the browser
public stream ( string $filename = 'document.pdf' ) : Illuminate\Http\Response
$filename string
Résultat Illuminate\Http\Response

Property Details

$config protected_oe property

protected Repository,Illuminate\Contracts\Config $config
Résultat Illuminate\Contracts\Config\Repository

$dompdf protected_oe property

protected Dompdf,Dompdf $dompdf
Résultat Dompdf\Dompdf

$files protected_oe property

protected Filesystem,Illuminate\Filesystem $files
Résultat Illuminate\Filesystem\Filesystem

$orientation protected_oe property

protected $orientation

$paper protected_oe property

protected $paper

$public_path protected_oe property

protected $public_path

$rendered protected_oe property

protected $rendered

$showWarnings protected_oe property

protected $showWarnings

$view protected_oe property

protected Factory,Illuminate\Contracts\View $view
Résultat Illuminate\Contracts\View\Factory