smalot / smalot/pdfparser

completely different output for table data (2.7.0 vs 2.8.0)

Open
#674 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
PHP
Stars
2.7k
Forks
579
Avg merge
2m
Merged PRs (30d)
1

Description

  • PHP Version: 7.4 / 8.2 (same output)
  • PDFParser Version: 2.7.0 vs 2.8.0
Description:

I'm using this library for more than a year now and until version 2.8.0 i didn't have a single issue with it. after updating to 2.8.0 i'm getting a completely different output for the same pdf file. unfortunately, this output can't be parsed in order to extract the data i'm interested in.

PDF input

c0

Expected output & actual output
2.7.0 (this is ok and can easily be parsed)

c1

2.8.0 (this can't be parsed)

c2

Code

file_put_contents('./test2.dat', (new \Smalot\PdfParser\Parser())->parseFile('./invoice.pdf')->getText());

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Parser parseFile(...)->getText() call shown in the issue and reproduce it with invoice.pdf using PDFParser 2.7.0 and 2.8.0 on the reported PHP versions. Compare the table output and trace the version difference; done means the regression is isolated and a test or confirmed fix covers the affected output.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.