Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined array key when calling getDataTm() #576

Closed
afanazmy opened this issue Feb 15, 2023 · 0 comments · Fixed by #634
Closed

Undefined array key when calling getDataTm() #576

afanazmy opened this issue Feb 15, 2023 · 0 comments · Fixed by #634
Labels

Comments

@afanazmy
Copy link

  • PHP Version: 8.0.27
  • PDFParser Version: 2.3

Description:

When I call getDataTm it shows Undefined array key 71. This error occurs at Smalot/PdfParser/Page.php:704.
The PDF that I use is a PDF generated by mPDF.

PDF input

63ed26d07e3d1-erkk-pdf.pdf

Expected output & actual output

I'm expecting output something like this:
image

However the actual output I get is like this:
image

Code

$parser = new Parser();
$pdf = $parser->parseFile(storage_path("app/$tmpPath"));
$pages = $pdf->getPages();

$dataTm = [];
foreach ($pages as $page) {
    $dataTm[] = $page->getDataTm();
}

return var_dump($dataTm);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants