pdfparser
pdfparser copied to clipboard
Method getDataTm return empty array
- PHP Version: 7.3
- PDFParser Version: latest
Description:
Hi,
I'm using the latest version of smalot pdf parser, and trying to use getDataTm on the attached PDF, but always return an empty array.
PDF input
Expected output & actual output
Code
include('vendor/autoload.php');
$config = new Smalot\PdfParser\Config();
$config->setDataTmFontInfoHasToBeIncluded(true);
// use config and parse file
$parser = new Smalot\PdfParser\Parser([], $config);
$pdf = $parser->parseFile('test.pdf');
$data = $pdf->getPages()[0]->getDataTm();
var_dump($data);