smalot / smalot/pdfparser

Pdfparser Stops no Error, Font.php memory exhausted

Open
#141 4 comments 3 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

Allowed memory size of 134217728 bytes exhausted (tried to allocate 524288 bytes)
Font.php [line] => 199

(I know i can increase memory limit.)
This happens when i loop through a large amount of pdfs, but always on a specific document, if i remove it, the processes will continue and parse a lot more until it finds another similar doc. I have notice that those pdfs were created with pdf Nitro.

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

Reproduce the failure while parsing the Nitro-created PDF that triggers the memory exhaustion, then inspect Font.php at line 199 and the surrounding font-parsing flow. Compare it with documents that parse successfully and determine what allows processing to continue without exhausting memory; done means the affected PDFs no longer stop the loop unexpectedly.

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
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.