PHP 클래스 Spatie\PdfToImage\Pdf

파일 보기 프로젝트 열기: spatie/pdf-to-image 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$outputFormat
$page
$pdfFile
$resolution
$validOutputFormats

공개 메소드들

메소드 설명
__construct ( string $pdfFile )
getImageData ( string $pathToImage ) : Imagick Return raw image data.
getNumberOfPages ( ) : integer Get the number of pages in the pdf file.
isValidOutputFormat ( $outputFormat ) : boolean Determine if the given format is a valid output format.
saveAllPagesAsImages ( string $directory, string $prefix = '' ) : array Save the file as images to the given directory.
saveImage ( string $pathToImage ) : boolean Save the image to the given path.
setOutputFormat ( string $outputFormat ) Set the output format.
setPage ( integer $page ) Set the page number that should be rendered.
setResolution ( integer $resolution ) Set the raster resolution.

보호된 메소드들

메소드 설명
determineOutputFormat ( $pathToImage ) : string Determine in which format the image must be rendered.

메소드 상세

__construct() 공개 메소드

public __construct ( string $pdfFile )
$pdfFile string The path to the pdffile.

determineOutputFormat() 보호된 메소드

Determine in which format the image must be rendered.
protected determineOutputFormat ( $pathToImage ) : string
$pathToImage
리턴 string

getImageData() 공개 메소드

Return raw image data.
public getImageData ( string $pathToImage ) : Imagick
$pathToImage string
리턴 Imagick

getNumberOfPages() 공개 메소드

Get the number of pages in the pdf file.
public getNumberOfPages ( ) : integer
리턴 integer

isValidOutputFormat() 공개 메소드

Determine if the given format is a valid output format.
public isValidOutputFormat ( $outputFormat ) : boolean
$outputFormat
리턴 boolean

saveAllPagesAsImages() 공개 메소드

Save the file as images to the given directory.
public saveAllPagesAsImages ( string $directory, string $prefix = '' ) : array
$directory string
$prefix string
리턴 array $files the paths to the created images

saveImage() 공개 메소드

Save the image to the given path.
public saveImage ( string $pathToImage ) : boolean
$pathToImage string
리턴 boolean

setOutputFormat() 공개 메소드

Set the output format.
public setOutputFormat ( string $outputFormat )
$outputFormat string

setPage() 공개 메소드

Set the page number that should be rendered.
public setPage ( integer $page )
$page integer

setResolution() 공개 메소드

Set the raster resolution.
public setResolution ( integer $resolution )
$resolution integer

프로퍼티 상세

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

protected $outputFormat

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

protected $page

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

protected $pdfFile

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

protected $resolution

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

protected $validOutputFormats