gettext empty result
Open
Nobody has claimed this yet.
bug
- Dominant language
- PHP
- Stars
- 2.7k
- Forks
- 579
- Avg merge
- 2m
- Merged PRs (30d)
- 1
Description
Hello, Iwant to extract this pdf, but the result is empty.
https://www.mediafire.com/file/azb7yddqo2ry55j/123.pdf/file
this is my code
$parser = new \Smalot\PdfParser\Parser(); // Parse pdf file using Parser library
$pdf = $parser->parseFile($file);
$metaData = $pdf->getDetails();
print_r($metaData);
$pages = $pdf->getPages();
foreach ($pages as $page) {
$text = $page->getText();
echo "<div>".$text."</div>";
}
echo $file;
the result just
Array
(
[Producer] => cairo 1.17.4 (https://cairographics.org
[Pages] => 1
)
<div></div>D:\web\D\public\pdf_po/123.pdf
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 the linked PDF and the shown Parser::parseFile(), getPages(), and Page::getText() calls. Start by checking whether the PDF contains extractable text, then trace the page text extraction path and compare its behavior with a text-bearing PDF. Done means identifying the cause of the empty result and documenting or testing a reproducible fix.
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
- 25/100