Clinical-Genomics / scout

VCF visualization interface
https://clinical-genomics.github.io/scout
BSD 3-Clause "New" or "Revised" License
150 stars 46 forks source link

Improve PDF view of the delivery reports #4571

Closed ivadym closed 1 month ago

ivadym commented 5 months ago

We are updating the delivery report HTML (#3118), so it would be great to synchronise the changes with the PDF conversion, as I've identified some issues:

ivadym commented 5 months ago

I've given up on https://github.com/Clinical-Genomics/scout/pull/4563 because I couldn't resolve most layout issues. While portrait orientation worked, pdfkit is ignoring the zoom argument and other directives added directly in the HTML.

In Balsamic, we also use pdfkit (v1.0.0) for the CNV reports and we found a solution for hte table page break issues here. However, Scouts html_to_pdf_file seem to not recognise any of these styles from the HTML

northwestwitch commented 5 months ago

I can try to help if you want? I'm not an expert of pdfKit but I've written the code of that html_to_pdf_file function. Are the issues:

?

ivadym commented 5 months ago

Yes, that would be great, thanks!

After trying a couple of things, I think some of the issues, like the headings, could be related to us using Bootstrap. However, we should be able to solve the page breaks. If we need to update the template, I can help you with that.

northwestwitch commented 5 months ago

I also think it might be bootstrap stuff. Let me know/tag me on stuff I might help with!

ivadym commented 1 month ago

I will close it for now since currently there is no real need to look into this further. To solve this issue, we need to identify whether wkhtmltopdf or Bootstrap is causing the poor rendering. It's a known issue in wkhtmltopdf, as pointed out in previous messages. If it eventually gets resolved, the solution could be as simple as updating to the latest version accordingly.