eKoopmans / html2pdf.js

Client-side HTML-to-PDF rendering using pure JS.
MIT License
3.92k stars 1.37k forks source link

Who wasted their time on this? #668

Open Nick- opened 9 months ago

Nick- commented 9 months ago

Right click print save as PDF has already been a solution for this.. Let's use our skills to solve real problems going forward OK?

undercontr commented 9 months ago

@Nick- That was very unfortunate comment. If you don't experience html to pdf or any other experience, you will never going forward.

davidnbooth commented 9 months ago

@Nick- Javascript, even when limited to the web browser, has an enormous range of applications, perhaps more than any other programming language. Suppose you have 10 000 html sites that you want to convert to pdf. Will you pay me whatever the going rate for such labour is in your area, to manually right click print save as PDF on every single one? (If you will, please contact me, I could use the income 😂)

As a specific example, the company where I work uses this library in a visitor management application which runs on an iPad mounted in kiosks in the reception area of various offices. Visitors to the office are asked to read and sign a safety agreement when they arrive, which is rendered in html. In the background, the app automatically converts the signed copy to a PDF, uploads it to amazon S3, and sends the visitor an email with a copy of the agreement attached. The company using this app can also access a web portal where they can view their visitors and see all of the signed agreements, for auditing/compliance purposes.

Your alternative is that the visitor should instead "Right click print save as PDF" (none of which exist in the iPad context), and then what? Go into the Mail app on the iPad, and send themselves and their host a copy of this agreement, and then some kind of separate email scraping service will collect the PDFs into a single place for the host company to review later?

Nick- commented 9 months ago

Good use case, thanks for explaining

Sanan4li commented 8 months ago

This should be closed now.

msberends commented 7 months ago

To ChatGPT:

There's a dude on Github not understanding the great use cases html2pdf.js could have. He put a comment in the Issues section:

Right click print save as PDF has already been a solution for this.. Let's use our skills to solve real problems going forward OK?

Please help him out, by explaining to him why this project is important.

Its response:

Hi @Nick-

Thanks for sharing your perspective. You're right that the right-click, print, and save as PDF method provides a straightforward way to convert web content into a PDF format. However, html2pdf.js offers several key advantages that cater to more complex and automated needs which this basic method can't fulfill.

In conclusion, while right-click, print, and save as PDF works for individual, ad-hoc cases, html2pdf.js extends the functionality to meet the needs of dynamic, automated, and professional web applications. It's about enhancing capabilities and providing solutions that cater to a wider range of scenarios.


I personally think ChatGPT is way too subtle for you. But now this 'issue' can be closed. And please try to be constructive on this platform.

tiagorangel2011 commented 6 months ago

close this please

karencfisher commented 4 months ago

Seems pretty useful as I have, for example, navigation buttons on a page that I don't want to be included in the PDF. and it provides users with a convenient "download PDF" button amongst those. Better UX overall.