smalot / smalot/pdfparser

pdf with background image/color gives Invalid object reference for $obj. Error

Open
#550 11 comments 1 reaction 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

Exception: Invalid object reference for $obj. in Smalot\PdfParser\RawData\RawDataParser->getindirectObject() (line 528 in vendor/smalot/pdfparser/src/Smalot\PdfParser/RawData/RawDataParser.php)
im using v1.1.0, I tried the latest version but still get the same issue.

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 by reproducing the error with a PDF containing a background image or color, then inspect vendor/smalot/pdfparser/src/Smalot\PdfParser\RawData\RawDataParser.php at line 528 and trace the invalid object reference. Done means that this PDF is parsed without the reported exception and the behavior is covered by a regression check.

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
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.