PdfGen
Quakeworx Problem
The Quakeworx web portal is used to run various applications on the cloud and consolidate results for analysis. In UCERF3-ETAS, one such Quakeworx application, aftershock simulations are run and results are collected in a large HTML file, which links to many external plots, CSS, and other resources. Unfortunately, this HTML file cannot be rendered with its resources directly in the Quakeworx portal and all plots must be downloaded. This is very time consuming and tedious.
Current Solution
Individual plot PDFs, PNGs, and data CSVs can be viewed directly inside the Quakeworx application Output page to see results quickly, although navigating the resources is cumbersome. The current best solution is to download everything, but this can take a very long time when simulations have a large number of catalogs.
Proposed Solution
The plots and tables are already placed in a readable HTML document. To have a portable document that contains all these resources without external links, we can convert this into a PDF. PdfGen is a tool that wraps the wkhtmltopdf engine and provides post-processing scripts and custom CSS to ensure well-formatted data that can be viewed directly in the Quakeworx web portal.
Docs and Code
The source code and installation instructions for Rocky Linux 8 (Expanse HPC): https://github.com/abhatthal/pdfgen