Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/optimize #167

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

poncianodiego
Copy link

  • Adds option to use the memory optimization extension through an .env variable

@poncianodiego
Copy link
Author

@codedge full proposal here 🚀

@codedge
Copy link
Owner

codedge commented Jul 22, 2022

Sorry, but it is totally unclear to me what problem this PR should solve.

Regarding the FPDF_FONTPATH
I merged a PR #169 that allows setting the FPDF_FONTPATH env var and thus let you define a different font path. So please remove these changes from this PR.

Memory optimization
Please explain what the original problem is, and how you solve it with this PR. Also resolve the conflicts, please.

@poncianodiego
Copy link
Author

poncianodiego commented Jul 22, 2022

@codedge it will optimize memory, when you are producing a large PDF file it might time out, this PR allows you to create the PDF file on the very first PDF page, then it will append every new page, hence optimizing the memory required to "hold" all the pages and therefore it will not timeout. See more details on the plugin’s link. By the plugin's words:

"The standard FPDF class builds the document entirely in memory, which can be problematic for large documents. This extension saves the pages to the destination file as soon as they are finished, which solves the issue."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants