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

getDataTm returns empty array for one page only #717

Open
mrasmith opened this issue May 31, 2024 · 2 comments
Open

getDataTm returns empty array for one page only #717

mrasmith opened this issue May 31, 2024 · 2 comments
Labels

Comments

@mrasmith
Copy link

mrasmith commented May 31, 2024

  • 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

rearranged.pdf

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();
@k00ni k00ni added the bug label May 31, 2024
@FredWolk
Copy link

FredWolk commented Aug 1, 2024

I have a similar problem. I can't get the text from one page out of 10. And this happens in different files. Some files are parsed normally. Others with this problem.

@kostjerry
Copy link

+1 to the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants