I have to generate a PDF when the user click the button in react. I have tried client side genaration for PDF, which doesn't seem to render well for smartphones. So I am doing the same in node Js but this is hosted as a function app in Azure, and react part as a web app.
I am using handler and puppeteer to generate pdf and store it in a blob. How do I generate HTML dynamically for each request or send the whole component as a payload from the web app.
Instead of sending HTML, you could probably try to send a Deep Link to the exact view, have puppeteer render it and generate the PDF.
Downsides of this would be
Also, you could build a separate service for doing this instead of trying to generate from the client application markup.
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.