smalot / pdfparser

PdfParser, a standalone PHP library, provides various tools to extract data from a PDF file.
GNU Lesser General Public License v3.0
2.41k stars 537 forks source link

Facing an Error: Invalid object reference for $obj. #714

Open mumer96 opened 6 months ago

mumer96 commented 6 months ago

My Funciton: public function uploadFile(Request $request) { $file = $request->file; $tempPath = $file->getRealPath(); $parser = new \Smalot\PdfParser\Parser(); $pdf = $parser->parseFile($tempPath); $text = $pdf->getText(); }

![Uploading image.png…]()

k00ni commented 5 months ago

Your example doesn't work, please provide a working example PDF or a test which triggers the error.

k00ni commented 5 months ago

@mumer96 does the linked PDF from https://github.com/smalot/pdfparser/issues/703#issuecomment-2149252621 trigger the error too?

martinemmert commented 2 months ago

I encounter the same issue with the linked PDF from #703