Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -421,17 +421,7 @@ with column1:
|
|
421 |
if bg_doc:
|
422 |
|
423 |
canvas_result=None
|
424 |
-
|
425 |
-
binary_data = base64.b64encode(bg_doc.getvalue()).decode('utf-8')
|
426 |
-
pdf_display = F'<embed class="pdfobject" type="application/pdf" title="Embedded PDF" src="data:application/pdf;base64,{binary_data}" width={screen_width//2.07} height={screen_height//1.83} type="application/pdf">'
|
427 |
-
st.markdown(pdf_display, unsafe_allow_html=True)
|
428 |
-
pdf_display = f"""<embed
|
429 |
-
class="pdfobject"
|
430 |
-
type="application/pdf"
|
431 |
-
title="Embedded PDF"
|
432 |
-
src="data:application/pdf;base64,{binary_data}"
|
433 |
-
style="overflow: auto; width: 100%; height: 100%;">"""
|
434 |
-
st.markdown(pdf_display, unsafe_allow_html=True)
|
435 |
with open("temp.pdf", "wb") as f:
|
436 |
f.write(bg_doc.getbuffer())
|
437 |
|
|
|
421 |
if bg_doc:
|
422 |
|
423 |
canvas_result=None
|
424 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
425 |
with open("temp.pdf", "wb") as f:
|
426 |
f.write(bg_doc.getbuffer())
|
427 |
|