Pdf
in package
Pop Pdf class
Tags
Table of Contents
Methods
- extractTextFromData() : string
- Extract text from raw data stream
- extractTextFromFile() : string
- Extract text from file
- importFromFile() : AbstractDocument
- Import from an existing PDF file
- importFromImages() : AbstractDocument
- Import from an existing PDF file
- importRawData() : AbstractDocument
- Import from raw data stream
- outputToHttp() : void
- Output to HTTP response
- writeToFile() : void
- Write document to file
Methods
extractTextFromData()
Extract text from raw data stream
public
static extractTextFromData(string $data[, mixed $pages = null ][, int|null $pageLimit = null ]) : string
Parameters
- $data : string
- $pages : mixed = null
- $pageLimit : int|null = null
Return values
stringextractTextFromFile()
Extract text from file
public
static extractTextFromFile(string $file[, mixed $pages = null ][, int|null $pageLimit = null ]) : string
Parameters
- $file : string
- $pages : mixed = null
- $pageLimit : int|null = null
Return values
stringimportFromFile()
Import from an existing PDF file
public
static importFromFile(string $file[, mixed $pages = null ]) : AbstractDocument
Parameters
- $file : string
- $pages : mixed = null
Return values
AbstractDocumentimportFromImages()
Import from an existing PDF file
public
static importFromImages(string|array<string|int, mixed> $images[, int $quality = 70 ]) : AbstractDocument
Parameters
- $images : string|array<string|int, mixed>
- $quality : int = 70
Tags
Return values
AbstractDocumentimportRawData()
Import from raw data stream
public
static importRawData(string $data[, mixed $pages = null ]) : AbstractDocument
Parameters
- $data : string
- $pages : mixed = null
Return values
AbstractDocumentoutputToHttp()
Output to HTTP response
public
static outputToHttp(AbstractDocument $document[, string $filename = 'pop.pdf' ][, bool $forceDownload = false ][, array<string|int, mixed> $headers = [] ]) : void
Parameters
- $document : AbstractDocument
- $filename : string = 'pop.pdf'
- $forceDownload : bool = false
- $headers : array<string|int, mixed> = []
writeToFile()
Write document to file
public
static writeToFile(AbstractDocument $document[, string $filename = 'pop.pdf' ]) : void
Parameters
- $document : AbstractDocument
- $filename : string = 'pop.pdf'