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.3k stars 534 forks source link

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

Open mumer96 opened 1 month ago

mumer96 commented 1 month 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 1 month ago

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

k00ni commented 4 weeks ago

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