Editing user-submitted PDF with PyMuPDF then making it available for download

Indeed, pdf_file is a Document object, not what st.download_button expects at all. You can save the document to a io.BytesIO object.

1 Like