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

PDF Merge #7

Open
dbpolito opened this issue Oct 19, 2020 · 3 comments
Open

PDF Merge #7

dbpolito opened this issue Oct 19, 2020 · 3 comments

Comments

@dbpolito
Copy link
Member

A common need is merging pdfs, looks like it would be pretty easy to implement with a new endpoint to our microservice:

https://stackoverflow.com/questions/48510210/puppeteer-generate-pdf-from-multiple-htmls
https://www.npmjs.com/package/easy-pdf-merge
https://www.npmjs.com/package/pdf-merge

@fabriciojs
Copy link
Member

@dbpolito that is nice! How to do you envision we could implement this?

Maybe the current methods should start accepting either a string (like they do now) or an array as the argument - meaning a list of URLs or a list of HTML contents.

Then given we receive that, we do the merge in the end.

How does that sound? any different idea?

@dbpolito
Copy link
Member Author

dbpolito commented Oct 19, 2020

My initial idea was working directly with PDFs, we wouldn't necessarily need puppeteer for it, so you would upload multiple pdfs and it would return a single pdf.

@dbpolito dbpolito removed the good first issue Good for newcomers label Oct 19, 2020
@dbpolito
Copy link
Member Author

dbpolito commented Oct 19, 2020

So having a new endpoint /merge and upload a few files to it... not sure what options we might have on the tools for merging pdfs...

But it might be indeed useful have another feature for generating a pdf from multiple sources, like urls and content...

Something like /from-multiple:

{
   "source": [
        {"type": "html", "value": "<html>"},
        {"type": "url", "value": "http://"},
   ],
   "options": {},
}

Would be very powerful, if we could mix this with uploaded files for pdfs would be even awesome, or adding as bin? base64?

Thoughts?

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

No branches or pull requests

2 participants