Vishnu-add commited on
Commit
a8f09fc
1 Parent(s): 70507a8

Displaying the read base64 pdf

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -97,8 +97,8 @@ def displayPDF(file,file_name):
97
  base64_pdf = base64.b64encode(f.read()).decode('utf-8')
98
 
99
  # Embedding PDF in HTML
100
- # pdf_display = f'<iframe src="data:application/pdf;base64,{base64_pdf}" width="700" height="900" type="application/pdf"></iframe>'
101
- pdf_display = f'<iframe src="{file}" width="700" height="900" type="application/pdf"></iframe>'
102
  # st.write()
103
  # pdf_display = f'<embed src="http://localhost:8900/{file_name}" width="700" height="1000" type="application/pdf"></embed>'
104
  # pdf_display = f'<iframe src="http://localhost:8900/{file_name}" width="700" height="900" type="application/pdf"></iframe>'
 
97
  base64_pdf = base64.b64encode(f.read()).decode('utf-8')
98
 
99
  # Embedding PDF in HTML
100
+ pdf_display = f'<iframe src="data:application/pdf;base64,{base64_pdf}" width="700" height="900" type="application/pdf"></iframe>'
101
+ # pdf_display = f'<iframe src="{file}" width="700" height="900" type="application/pdf"></iframe>'
102
  # st.write()
103
  # pdf_display = f'<embed src="http://localhost:8900/{file_name}" width="700" height="1000" type="application/pdf"></embed>'
104
  # pdf_display = f'<iframe src="http://localhost:8900/{file_name}" width="700" height="900" type="application/pdf"></iframe>'