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

gettext empty result #652

Open
bigmoney99 opened this issue Nov 14, 2023 · 1 comment
Open

gettext empty result #652

bigmoney99 opened this issue Nov 14, 2023 · 1 comment
Labels

Comments

@bigmoney99
Copy link

bigmoney99 commented Nov 14, 2023

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
@k00ni k00ni added the bug label Nov 15, 2023
@GreyWyvern
Copy link
Contributor

Issue seems to appear both in 2.7.0 and 2.8.0rc. For some reason no text content sections are found and delivered to formatContent() to parse. Text is selectable from within a PDF reader, so there is text there. More research is needed.

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

3 participants