Documentation

ExtractedPdf
in package

An extracted sub-Pdf.

Table of Contents

Properties

$filename  : string
$pageCount  : int
The number of pages in the file.
$pdfBytes  : string

Methods

__construct()  : mixed
Initializes a new instance of the ExtractedPdf class.
asInputSource()  : BytesInput
Return the file in a format suitable for sending to MindeeClient for parsing.
getFilename()  : string
getPdfBytes()  : string
writeToFile()  : void
Write the PDF to a file.
getPageCount()  : int
Wrapper for pdf GetPageCount().

Properties

$pageCount

The number of pages in the file.

public int $pageCount

Methods

__construct()

Initializes a new instance of the ExtractedPdf class.

public __construct(string $pdfBytes, string $filename) : mixed
Parameters
$pdfBytes : string

A binary string representation of the PDF.

$filename : string

Name of the original file.

Tags
throws
MindeeUnhandledException

Throws if PDF operations aren't supported.

asInputSource()

Return the file in a format suitable for sending to MindeeClient for parsing.

public asInputSource() : BytesInput
Return values
BytesInput

bytes input for the image

getFilename()

public getFilename() : string
Return values
string

the name of the file

getPdfBytes()

public getPdfBytes() : string
Return values
string

the pdf bytes

writeToFile()

Write the PDF to a file.

public writeToFile(string $outputPath) : void
Parameters
$outputPath : string

The output directory (must exist).

getPageCount()

Wrapper for pdf GetPageCount().

private getPageCount() : int
Tags
throws
MindeePdfException

Throws if FPDI is unable to process the file.

Return values
int

the number of pages in the file

On this page

Search results