❔ Convert cshtml view to PDF file
Basically title.
I had this functionality working already, but its working weirdly slow sometimes... its also probably not the best, because I am geenrating it with Puppeteer, so technically I am opening the html content in the hidden browser, and then downloading it from there.
What would be the best free option to do this?
7 Replies
Rendering it with a browser and doing "print to pdf" is probably the easiest, and thats exactly what puppeteer does.
yeah i know, but for some reasong it doesnt work consistently.. sometimes it reneders it instantly, and sometimes loads for like 30sec, or doesnt even render it at all..
Curious. I wrote something very similar using a .NET webapi that could just wrap a puppeteer script to generate PDFs, and unless the page had a lot of funky JS it worked fine
Hm, i dont have any JS, so technically it should for perfect.. I will turn off the headless mode, maybe i will figure something out
¯\_(ツ)_/¯
its hard to debug, that is one of the downsides
*cough* QuestPDF *cough*
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.