Necessary whitespace is not being preserved.
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 2.7k
- Forks
- 579
- Avg merge
- 2m
- Merged PRs (30d)
- 1
Description
Test case: Input Pdf file is 501 German Verbs.pdf available at downloaded from https://archive.org/details/501GermanVerbs
Code:
include 'vendor/autoload.php';
$parser = new \Smalot\PdfParser\Parser();
$pdf = $parser->parseFile('./501 German Verbs.pdf');
$text = $pdf->getText();
file_put_contents('./output.txt', $text);
Line 433 should begin with
ich werde sprechen
instead it is:
ichwerde sprechen
There dozens and dozens of similar lines throughout the document where "ich"--which is the German pronoun for I--is NOT followed by a whitespace character.
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.
Research direction
Reproduce the report with 501 German Verbs.pdf using vendor/autoload.php, Parser, parseFile, and getText(), then inspect the text-extraction path reached by that entry point. Compare output.txt with line 433 and the other reported occurrences; done means the whitespace after "ich" is preserved in the extracted text.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100