1. 安裝
pip install pdfkit
pip install Jinja2
同時安裝 wkhtmltopdf;
2. 使用Plotly + Jupyter notebook + xhtml2pdf生成pdf report
https://plotly.com/python/v3/pdf-reports/
3. 利用pdf_reports包生成pdf,
https://github.com/Edinburgh-Genome-Foundry/pdf_reports
上述方法都有一個特點,需要藉助一定的HTML代碼生成最後的pdf文檔。
目前沒有找到類似於R語言中的Rmarkdown方便生成pdf文檔。