getDataTm returns empty array for one page only
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start with the attached rearranged.pdf and reproduce the issue using Parser, parseFile(), getPages()[1], and getDataTm(). Compare the page that returns data with the page that returns an empty array, then verify that the affected page can be parsed without changing the expected output for the other pages.
Written by the indexing model from the issue text.
Description
- PHP Version: 8.3.1
- PDFParser Version: 2.10
Description:
I have a muti page pdf (about 90 pages) . All pages contain table of similar data and all parse with getDataTm without issue except one, getDataTm returns an empty array on the problem page. I've attached two pages of the document, the second page is the one that one won't parse.
PDF input
Expected output & actual output
result from page 1:
Array
(
[0] => Array
(
[0] => Array
(
[0] => 1
[1] => 0
[2] => 0.000000
[3] => -1
[4] => 377.119995
[5] => 33.279999
)
[1] => SNAPSHOT - MERLIN CAR AUCTIONS - JANUARY TO APRIL2024
)
etc
result from page 2:
Array ()
Code
$parser = new \Smalot\PdfParser\Parser();
$pdf = $parser->parseFile('rearranged.pdf');
$data = $pdf->getPages()[1]->getDataTm();
- Dominant language
- PHP
- Stars
- 2.7k
- Forks
- 579
- Avg merge
- 2m
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from smalot/pdfparser
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 72/100
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 68/100
All issues in smalot/pdfparser
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
getgrav/grav-plugin-api#45 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
RSS-Bridge/rss-bridge#5098 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
phingofficial/phing#2025 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
silverstripe/developer-docs#911 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100