smalot / smalot/pdfparser

Facing an Error: Invalid object reference for $obj.

Open
#714 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
PHP
Stars
2.7k
Forks
579
Avg merge
2m
Merged PRs (30d)
1

Description

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();
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported uploadFile function and trace the Parser::parseFile($tempPath) call, using the error title and the uploaded PDF input to establish a reproducible failure. Done means the cause is confirmed and the issue has either a verified library fix or a clearly documented non-library cause.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.