Cannot read PDF from st.upload with PyMuPDF

This worked…
before the doc=pymupdf.open(stream=uploaded_file.read(),filetype=“pdf”)

uploaded_file.seek(0,0)

solution