Links or not (I found that using the gems that my wkhtmltopdf was not Static binary which patches QT), inconsistencies as to whether it renders
Mac to ubuntu), issues with rendering on ubuntu (requiring need to install a Definitely issues with installation (going from My experience has been that I ate up what would have been a lot of the $3k > My understanding is that wk is nearly as good without the $3000 price
> really lovely CSS-controlled PDF layouts. > wrapper in Rails to use that, I recommend it heartily. > I've used PrinceXML in another (PHP) project. ` directly, but it depends on what you are trying > For my app, I found it easier to not use any of the gems, but just > dependencies, had to do with scaling and fonts.) The API embraces chainability, and includes both low level functions as well as abstractions for higher level functionality.
Description PDFKit is a PDF document generation library for Node and the browser that makes creating complex, multi-page, printable documents easy. > installed and acting the same way on my server as it did on my A JavaScript PDF generation library for Node and the browser. The largest pain I had was getting wkhtmltopdf > you don't care about exact placement of items. > I've played around with all three and have found them all to work if It is going to be difficult convincing the higher-ups to pay $3800 for page numbers, but without it we have to resort to crazy hacks (I seriously considered passing the PDF from headless Chrome to LaTeX for page numbers…).> On Jan 13, 2011, at 9:48 AM, Paul wrote: It feels like HTML → print is not an important use case to the standards bodies, and Prince is one of the few renderers that implement HTML+CSS+CSS Paged Media correctly. It is very difficult implementing a renderer for HTML+CSS with a small team, while working on this I had encountered a bug where the PDF text won’t display in Chrome while it does in Firefox. The samples at are impressive, but they also highlight the inconsistencies among renderers. Good to hear another happy user of Prince, it was on the top of the list of tools to try until everyone saw the price tag for a commercial license. I never had anything I could not fix (with prince-engine). The rest are the same in both engine.ex and safe.ex besides renaming the modules and html_escape/1 to tex_escape/1Ĭonfig.exs: config :phoenix, :format_encoders, List of escaped characters (taken from PyLaTeX): escapes = [ |> render("invoice.tex", example_invoice) When I look at the output on the browser, the whole template is escaped besides the EEx snippets. DocRaptor and PrinceXML are great solutions but I will need to go through some company process, in the meantime I would like to make EEx work with it.Īnyway I created a format encoder based on the one within Phoenix.HTML and changed the list of escape characters. We had a prototype built with Python3+Jinja2 and I am integrating it into our Phoenix application to simplify the codebase. There are some issues (distro packaging) but in general it went very well, the performance is comparable with headless Chrome yet the output is way better. Page numbers didn’t work either.Īfter investing quite some effort rewriting layout with older CSS and fighting with renderers to get an arguably acceptable output we switched to LaTeX. We are aware of Paged.js and used it with headless Chrome but for some reason it doesn’t work well enough (we need something to stay at a particular page, while break-before/inside/after works, it also creates a massive empty space where an element could fit). There the render finally looks alright but margin boxes aren’t supported. We encountered some issues with it (IIRC it is something about fonts but in general wkhtmltopdf is outdated) and ended up with pupeteer + Chrome. issues on GitHub), we tried pdfkit (a wrapper for wkhtmltopdf). Because of inconsistent renders compared to a browser (IIRC flexbox and tables, cf. We started with HTML → PDF with a prototype using WeasyPrint. Thanks for the reply! I don’t mean to dismiss your solutions but we have tried some of them and unfortunately the results are not very good.