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

Compile PDF to buffer instead of file #10

Open
zivlakmilos opened this issue Jan 23, 2023 · 1 comment
Open

Compile PDF to buffer instead of file #10

zivlakmilos opened this issue Jan 23, 2023 · 1 comment

Comments

@zivlakmilos
Copy link

Compiling PDF to buffer instead of saving it to file would be nice feature.

html-pdf library already support it, just use toBuffer instead of toFile method.

This is not hard to implement, and can be useful for developing web services or apis when pdf should be returned to client as response instead of saving it to file. Could be additional parameter that can me passed to create function or part of options object.

@Frontend-io
Copy link

That would be a nice feature honestly. As sometimes, you just want to generate and return the buffer. There should be an option for that. Perhaps if path is not passed, then return as buffer.

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