Skip to content

[Bug]: Memory out: Allowed memory size of 134217728 bytes exhausted (tried to allocate 69632 bytes) #301

@niranjanbai

Description

@niranjanbai

Is there an existing issue for this?

  • I have searched the existing issues and found no similar reports

Are you using the latest version of this package?

  • The issue I'm reporting exists in the latest release

Can other PDF readers read the file?

  • The PDF I'm trying to read opens correctly in at least one other PDF reader

When running this snippet

$document = (new PdfParser())->parseFile('/path/to/file.pdf');

I run into the following issue/exception (Please attach the pdf)

The attached PDF is only 2.5 MB, yet parsing it caused an out-of-memory error even with 1 GB allocated to PHP.

PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 69632 bytes) in vendor/prinsfrank/pdfparser/src/Document/CrossReference/CrossReferenceSourceParser.php on line 74

Encanto Catering Book.pdf

Do you allow attachment files to be used in tests to prevent regressions?

  • Yes, I give permission to use this file as a test file to prevent future regressions (And am authorized to give this permission)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions