PdfTools
in package
Table of Contents
Methods
- __construct() : mixed
- convertToPng() : array<string|int, string>
- getPdfinfoVersionInfo() : string
- getPdftopngVersionInfo() : string
- isPdf() : bool
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
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