Delay conversion of HTML until javascript is finished processing
We're prototyping pagedjs-cli for converting Manubot HTML manuscripts to PDF. Here is an example manuscript that includes javascript plugins that modify the HTML. For example, MathJax renders the equations.
As posted in this comment, MathJax has not finished rendering when pagedjs-cli does the conversion, so the output PDF contains:
athenapdf has a --delay
option for this situation
Gotenberg has a waitDelay
option:
In some cases, you may want to wait a certain amount of time to make sure the page you’re trying to generate is fully rendered. For instance, if your page relies a lot on JavaScript for rendering.
Ideally, it would be possible to know when a page was completely rendered. Although I am guessing that is a hard problem? So would a delay option make sense?