Package wkhtmltopdf is not available

Hey, thanks for sharing all the details and welcome to the Streamlit community! :rocket: Your issue is caused by the fact that the wkhtmltopdf package is no longer available in the default Debian repositories used by Streamlit Community Cloud, so the install fails and your app can’t generate PDFs.

To fix this, you have a couple of options:

  1. Switch to an alternative PDF generation library (like WeasyPrint or ReportLab) that doesn’t require a system-level binary, since these are pure Python and installable via requirements.txt.
  2. If you must use wkhtmltopdf, you’ll need to find a way to install it from a supported source. However, as of now, the default apt repositories on Streamlit Cloud do not provide wkhtmltopdf, and adding custom repositories is not supported. This means you can’t reliably install wkhtmltopdf via packages.txt anymore on Streamlit Cloud (see discussion, see also).

Recommended solution:
Switch to a pure Python PDF library like WeasyPrint. Add weasyprint to your requirements.txt and update your code to use it for HTML-to-PDF conversion. This avoids the need for system binaries and is fully supported on Streamlit Cloud.

If you need help converting your code to use WeasyPrint, let us know and share a minimum reproducible example! Also, if anyone in the community has found a workaround for installing wkhtmltopdf on Streamlit Cloud recently, please jump in and share your insights.

Sources: