I found that puppeteer sharp is best way for server side, HTML to PDF conversion as it uses and downloads latest chrome and runs headless in background so the conversion is top class. tables and all else is rendered perfectly.
However for running on server, how should the concurrency be managed, because i think each web site users conversion request will launch another chrome instance. how does puppeteer sharp manages concurrency.
is is better to split it as separate web service and enqueue conversion requests and pass all pdf related requests to be served on one by one basis instead of running into concurrency or resource issues on webserver for multiple chrome instances.
I found this is the most scalable way to implement this is by using a background process. This is one real-life example:
It might sound quite complicated, but it's not that much. You can make it simpler.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.