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

Can I create a large pdf without loading the entire file into memory? #306

Closed
justinmchase opened this issue Apr 19, 2023 · 1 comment
Closed

Comments

@justinmchase
Copy link

Suppose I have 100 images, and I want to create a single PDF with each of these images as a single page. I want to use a streaming api where I am streaming each file 1 at a time and piping it into the pdf which then writes to disk.

I have a memory constrained system and if it attempts to load the entire pdf into memory on this system it could crash. Is it possible to achieve this with the streaming api?

@rkusa
Copy link
Owner

rkusa commented Apr 21, 2023

Not right now I am afraid. pdfjs is/was meant for such use-cases, but this isn't working correctly for images right now (#291 (comment)). So I cannot recommend pdfjs for your use-case until this is fixed.

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

No branches or pull requests

2 participants