One of the most common documents generated by DocRaptor is a report, and what’s a report without an eye-catching chart or two? We’ve long supported charting libraries, like HighCharts, but today we’re taking another big (yet surprisingly simple) step forward with our HTML to PDF engine.
We’ve decided to take the simplest approach to the problem, and put the choice in the hands of our users. Now you can define a simple function called
true if your page has finished rendering, or
It’s more fun with an example, here’s one straight from our tests:
In a real-world example, you might set
true in your actual rendering function, or write the body of your
Because the function is called in the context of your page, you can use all of your usual tools, like jQuery or Underscore, to determine if DocRaptor should move on to PDF rendering.