pdfparser
pdfparser copied to clipboard
Mixed text from Columns
If there are text columns in the pdf, the text via getText() is mangled together.
For e.g:
| Column | Column |
|---|---|
| This is Column | This is Column |
| one, and there is | two and there is |
| even more text | not more text |
gets transformed to
This ist Column This is Column
one, and there is two and there is
even more text not more text
Maybe this could be targeted by using some special chars like tab "\t"?
This is fixed with #505 You can now do this:
$config = new \Smalot\PdfParser\Config();
$config->setHorizontalOffset("\t");
$parser = new \Smalot\PdfParser\Parser([], $config);
$pdf = $parser->parseFile('path/to/file');
$text = $pdf->getText();
Closed. Please reopen if problem persists.