HackerTrans
TopNewTrendsCommentsPastAskShowJobs

mimi_007

no profile record

comments

mimi_007
·8 months ago·discuss
You can skip low-level PDF libs entirely and just generate the PDF from an HTML/CSS template (or plain HTML or URLS). With PDFBolt you design the layout once in HTML/CSS + Handlebars, then your C# code sends JSON and gets a PDF back from the API. That avoids the whole DOM/layout/rendering headache and you don’t have to ship a browser engine yourself.

It’s not a replacement for permissively licensed libraries when you need everything local, but for reports/invoices/etc. it can save a lot of time.
mimi_007
·9 months ago·discuss
Yeah, wkhtmltopdf can be a pain, especially with modern CSS/JS-heavy pages. One option you could try is PDFBolt - you can design a template in HTML/CSS once, then simply pass the JSON data and template ID. It handles dynamic content and modern layouts without all the quirks of wkhtmltopdf. You can also convert HTML content or URLs to PDFs.