Documentation

Pdf
in package

Pop Pdf class

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

Copyright (c) 2009-2024 NOLA Interactive, LLC. (http://www.nolainteractive.com)

license

http://www.popphp.org/license New BSD License

version
5.2.0

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
string

extractTextFromFile()

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
string

importFromFile()

Import from an existing PDF file

public static importFromFile(string $file[, mixed $pages = null ]) : AbstractDocument
Parameters
$file : string
$pages : mixed = null
Return values
AbstractDocument

importFromImages()

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
throws
Exception
Return values
AbstractDocument

importRawData()

Import from raw data stream

public static importRawData(string $data[, mixed $pages = null ]) : AbstractDocument
Parameters
$data : string
$pages : mixed = null
Return values
AbstractDocument

outputToHttp()

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'

        
On this page

Search results