PDF is elegant on my eyes. To make it a web surfing experience for me it lacks one thing here, that I need the TOC on the left or right side so I can click and jump to various section quickly.
Would you be able to expand on what you mean by “report generation libraries”? For example, I am building (in Common Lisp, but it’s trivial and can be done in any software) a tool to read content from a database and auto generate the HTML markup for producing pdf reports. This allows me to reuse content across reports and also leverage the full power of databases (text search in particular). As another example, I have many monthly financial metrics - I will store these in a database then use my lisp markup tool to generate the necessary HTML to produce the pdf report (via paged.js). In addition, one can use headless chrome to automate the full workflow so that the reports are generated directly from your program and not via File > Print in your browser. Was that what you were thinking of? You can also add charts via charts.js. The beauty of paged.js is that you can leverage many of the features of browsers and JavaScript libraries in your report generation. I wasn’t able to get syntax highlighting for code blocks to work however, need to dig into that a bit more.
I started generating PDF before pagedjs and use my own electron based solution. Search for schild.report on github to see how it works. Basically reports are created via svelte templates and then printed via the electron print api. Works extremely well.
Can anyone speak to how this compares with something like wkhtmltopdf? That's what I've been using, and this is my first time hearing about PrinceXML too.
I generate some HTML for the user, they can edit it with a rich text editor like TinyMCE, and then we export to PDF on the server side. Wkhtmltopdf is pretty barebones on the style/feature side though, so this looks worth investigating.
From my limited experience with wkhtmltopdf, a solution based on paged.js should work better
But maybe that’s because I didn’t fully learn wkhtmltopdf PrinceXML is very good but is a paid solution. I found paged.js, at least for my purposes, on par with PrinceXML
Comments (265) 53 threads
Earlier commentsLet me know if that works well?
I've been looking for report generation solution based on frontend technology.
Btw. This is great. Thanks for sharing.
https://pagedown.rbind.io/
Would you be able to expand on what you mean by “report generation libraries”?
For example, I am building (in Common Lisp, but it’s trivial and can be done in any software) a tool to read content from a database and auto generate the HTML markup for producing pdf reports. This allows me to reuse content across reports and also leverage the full power of databases (text search in particular). As another example, I have many monthly financial metrics - I will store these in a database then use my lisp markup tool to generate the necessary HTML to produce the pdf report (via paged.js).
In addition, one can use headless chrome to automate the full workflow so that the reports are generated directly from your program and not via File > Print in your browser.
Was that what you were thinking of?
You can also add charts via charts.js.
The beauty of paged.js is that you can leverage many of the features of browsers and JavaScript libraries in your report generation.
I wasn’t able to get syntax highlighting for code blocks to work however, need to dig into that a bit more.
Yes! This is great. Thanks for the pointers. I'll look into that.
The actual PDF generation component is an electron application, so it may fit your "frontend technology" requirement.
I generate some HTML for the user, they can edit it with a rich text editor like TinyMCE, and then we export to PDF on the server side. Wkhtmltopdf is pretty barebones on the style/feature side though, so this looks worth investigating.
But maybe that’s because I didn’t fully learn wkhtmltopdf
PrinceXML is very good but is a paid solution. I found paged.js, at least for my purposes, on par with PrinceXML
All comments shown.
Couldn't load more comments. Check your connection and try again.