PHP 클래스 Barryvdh\Snappy\PdfWrapper

저자: Barry vd. Heuvel
파일 보기 프로젝트 열기: barryvdh/laravel-snappy 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$options array
$snappy Knp\Snappy\Pdf

공개 메소드들

메소드 설명
__call ( string $name, array $arguments ) : mixed Call Snappy instance.
__construct ( Knp\Snappy\Pdf $snappy )
download ( string $filename = 'document.pdf' ) : Illuminate\Http\Response Make the PDF downloadable by the user
inline ( string $filename = 'document.pdf' ) : Illuminate\Http\Response Return a response with the PDF to show in the browser
loadFile ( string $file ) Load a HTML file
loadHTML ( string $string ) Load a HTML string
loadView ( string $view, array $data = [], array $mergeData = [] ) Load a View and convert to HTML
output ( ) : string Output the PDF as a string.
save ( $filename, $overwrite = false ) Save the PDF to a file
setOption ( string $name, mixed $value )
setOptions ( array $options )
setOrientation ( string $orientation ) Set the orientation (default portrait)
setPaper ( string $paper, string $orientation = null ) Set the paper size (default A4)
setWarnings ( boolean $warnings ) Show or hide warnings
snappy ( ) : Knp\Snappy\Pdf Get the Snappy instance.
stream ( string $filename = 'document.pdf' ) : Symfony\Component\HttpFoundation\StreamedResponse Return a response with the PDF to show in the browser

메소드 상세

__call() 공개 메소드

Also shortcut's ->html => loadHtml ->view => loadView ->file => loadFile
public __call ( string $name, array $arguments ) : mixed
$name string
$arguments array
리턴 mixed

__construct() 공개 메소드

public __construct ( Knp\Snappy\Pdf $snappy )
$snappy Knp\Snappy\Pdf

download() 공개 메소드

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

inline() 공개 메소드

Return a response with the PDF to show in the browser
public inline ( string $filename = 'document.pdf' ) : Illuminate\Http\Response
$filename string
리턴 Illuminate\Http\Response

loadFile() 공개 메소드

Load a HTML file
public loadFile ( string $file )
$file string

loadHTML() 공개 메소드

Load a HTML string
public loadHTML ( string $string )
$string string

loadView() 공개 메소드

Load a View and convert to HTML
public loadView ( string $view, array $data = [], array $mergeData = [] )
$view string
$data array
$mergeData array

output() 공개 메소드

Output the PDF as a string.
public output ( ) : string
리턴 string The rendered PDF as string

save() 공개 메소드

Save the PDF to a file
public save ( $filename, $overwrite = false )
$filename

setOption() 공개 메소드

public setOption ( string $name, mixed $value )
$name string
$value mixed

setOptions() 공개 메소드

public setOptions ( array $options )
$options array

setOrientation() 공개 메소드

Set the orientation (default portrait)
public setOrientation ( string $orientation )
$orientation string

setPaper() 공개 메소드

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

setWarnings() 공개 메소드

Show or hide warnings
사용 중단:
public setWarnings ( boolean $warnings )
$warnings boolean

snappy() 공개 메소드

Get the Snappy instance.
public snappy ( ) : Knp\Snappy\Pdf
리턴 Knp\Snappy\Pdf

stream() 공개 메소드

Return a response with the PDF to show in the browser
사용 중단: use inline() instead
public stream ( string $filename = 'document.pdf' ) : Symfony\Component\HttpFoundation\StreamedResponse
$filename string
리턴 Symfony\Component\HttpFoundation\StreamedResponse

프로퍼티 상세

$options 보호되어 있는 프로퍼티

protected array $options
리턴 array

$snappy 보호되어 있는 프로퍼티

protected Pdf,Knp\Snappy $snappy
리턴 Knp\Snappy\Pdf