PHP Class Smalot\PdfParser\Document

Class Document
Show file Open project: smalot/pdfparser Class Usage Examples

Protected Properties

Property Type Description
$details array
$dictionary array
$objects Smalot\PdfParser\Object[]
$trailer Header

Public Methods

Method Description
__construct ( )
getDetails ( $deep = true ) : array
getDictionary ( ) : array
getFonts ( ) : Smalot\PdfParser\Object[]
getObjectById ( string $id ) : Smalot\PdfParser\Object
getObjects ( ) : Smalot\PdfParser\Object[]
getObjectsByType ( string $type, string $subtype = null ) : Smalot\PdfParser\Object[]
getPages ( ) : Page[]
getText ( Page $page = null ) : string
init ( )
setObjects ( Smalot\PdfParser\Object[] $objects = [] )
setTrailer ( Header $trailer )

Protected Methods

Method Description
buildDetails ( ) Build details array.
buildDictionary ( ) Build dictionary based on type header field.

Method Details

__construct() public method

public __construct ( )

buildDetails() protected method

Build details array.
protected buildDetails ( )

buildDictionary() protected method

Build dictionary based on type header field.
protected buildDictionary ( )

getDetails() public method

public getDetails ( $deep = true ) : array
return array

getDictionary() public method

public getDictionary ( ) : array
return array

getFonts() public method

public getFonts ( ) : Smalot\PdfParser\Object[]
return Smalot\PdfParser\Object[]

getObjectById() public method

public getObjectById ( string $id ) : Smalot\PdfParser\Object
$id string
return Smalot\PdfParser\Object

getObjects() public method

public getObjects ( ) : Smalot\PdfParser\Object[]
return Smalot\PdfParser\Object[]

getObjectsByType() public method

public getObjectsByType ( string $type, string $subtype = null ) : Smalot\PdfParser\Object[]
$type string
$subtype string
return Smalot\PdfParser\Object[]

getPages() public method

public getPages ( ) : Page[]
return Page[]

getText() public method

public getText ( Page $page = null ) : string
$page Page
return string

init() public method

public init ( )

setObjects() public method

public setObjects ( Smalot\PdfParser\Object[] $objects = [] )
$objects Smalot\PdfParser\Object[]

setTrailer() public method

public setTrailer ( Header $trailer )
$trailer Header

Property Details

$details protected property

protected array $details
return array

$dictionary protected property

protected array $dictionary
return array

$objects protected property

protected Object[],Smalot\PdfParser $objects
return Smalot\PdfParser\Object[]

$trailer protected property

protected Header,Smalot\PdfParser $trailer
return Header