igvteam / igv-reports

Python application to generate self-contained pages embedding IGV visualizations, with no dependency on original input files.
MIT License
350 stars 52 forks source link

converting the html to pdf #80

Closed laxvid closed 1 year ago

laxvid commented 1 year ago

What is the best way to deliver pdf files of the snapshots rather than html ?
The results are being viewed in an application that does not support html but does render pdf

Kyomari commented 1 year ago

There are several options available. There are many online converters available that allow you to upload HTML files and convert them to PDF format. Some popular options include PDFCrowd, PDFreactor, and HTML-to-PDF. Otherwise you could use libraries and APIs. There are also many libraries and APIs available that allow you to convert HTML to PDF programmatically. Some popular options include wkhtmltopdf, PrinceXML, and PhantomJS.

jrobinso commented 1 year ago

I'm not sure a html -> pdf converter is going to work, because the rendering is done in javascript in a browser. This project really isn't designed to render static images, the point of it is to render live, interactive pages. It might be possible to write a script with PhantomJS that would do the conversion, since that mimics a browser.

jrobinso commented 1 year ago

Closing as this doesn't appear to be technically possible. I would love to be proven wrong via a pull request.