Table of Contents
- $pdfinfo : string|null
- $pdfinfoVersionInfo : string
- $pdftopng : string|null
- $pdftopngVersionInfo : string
- $pdftoppm : string|null
- $verbose : bool
- __construct() : mixed
- convertToPng() : array<string|int, string>
- getPdfinfoVersionInfo() : string
- getPdftopngVersionInfo() : string
- isPdf() : bool
- ensureFolder() : mixed
Properties
$pdfinfo
private string|null $pdfinfo = null
Path to pdfinfo as shell argument
$pdfinfoVersionInfo
private string $pdfinfoVersionInfo
$pdftopng
private string|null $pdftopng = null
Path to pdftopng as shell argument
$pdftopngVersionInfo
private string $pdftopngVersionInfo
$pdftoppm
private string|null $pdftoppm = null
Path to pdftoppm as shell argument
$verbose
private bool $verbose
Methods
__construct()
public __construct(array<string|int,
string> $tools[,
bool $verbose
= false
]) : mixed
Parameters
- $tools : array<string|int, string>
-
Path to PDF tool executables (indexed by tool name)
- $verbose : bool = false
Return values
mixed —convertToPng()
public convertToPng(string $file,
string $pngRoot)
: array<string|int,
string>
Parameters
- $file : string
-
The path of the PDF document to convert into PNG
- $pngRoot : string
-
The root of the generated PNG file names. Example: if
$pngRoot = '/usr/home/TCPDF/compare_runs/my-root'
, the generated PNG files will be as follows:/usr/home/TCPDF/compare_runs/my-root-0000001.png
,/usr/home/TCPDF/compare_runs/my-root-0000002.png
,- ...
Tags
Return values
array<string|int, string> —List of paths for generated PNG (one per page)
getPdfinfoVersionInfo()
public getPdfinfoVersionInfo()
: string
Tags
Return values
string —pdfinfo version information (multiline information)
getPdftopngVersionInfo()
public getPdftopngVersionInfo()
: string
Tags
Return values
string —pdftopng or pdftoppm version information (multiline information)
isPdf()
public isPdf(string $file)
: bool
Parameters
- $file : string
-
Path of file to check
Tags
Return values
bool —ensureFolder()
private ensureFolder(mixed $path)
: mixed
Parameters
- $path : mixed