Closed trbtl closed 5 months ago
Also, if I select Rerun from the menu it will display the PDF.
To check my work I set up in a new folder. I installed a fresh virtual environment and pip installed a fresh streamlit and streamlit_pdf_viewer. I then coded a minimumal version of a pdf viewer (see below). It still won't show the pdf until I select Rerun from the menu it will display the PDF.
import streamlit as st
from streamlit_pdf_viewer import pdf_viewer
import os
filename = 'Choosing a Treatment for Kidney Failure - NIDDK.pdf'
st.write(filename)
folder_path = './docs'
uploaded = os.path.join(folder_path, filename)
pdf_viewer(input=uploaded, width=1000)
@trbtl thanks for reporting this issue. It seems related to #35 but I'm surprised that it happens as you pass the width
parameter.
Which browser and SO are you using?
Chrome
Thanks Bob
From: Luca Foppiano @.> Sent: Sunday, February 25, 2024 2:49 PM To: lfoppiano/streamlit-pdf-viewer @.> Cc: mail @.>; Mention @.> Subject: Re: [lfoppiano/streamlit-pdf-viewer] pdf not showing (Issue #37)
@trbtlhttps://github.com/trbtl thanks for reporting this issue. It seems related to #35https://github.com/lfoppiano/streamlit-pdf-viewer/issues/35 but I'm surprised that it happens as you pass the width parameter.
Which browser and SO are you using?
— Reply to this email directly, view it on GitHubhttps://github.com/lfoppiano/streamlit-pdf-viewer/issues/37#issuecomment-1963088750, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BA2JSE4U3L2ZJGVUGPIS72TYVO5V5AVCNFSM6AAAAABDYMY2YSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRTGA4DQNZVGA. You are receiving this because you were mentioned.Message ID: @.**@.>>
This is likely a regression from #28. If you revert to version 0.0.7 it should work, however, the application will use more CPU because of an infinite loop in the frontend.
That works! What is it about version 0.0.8 that is a problem with chromium browsers? Will this be an issue going forward?
Thanks Bob
From: Luca Foppiano @.> Sent: Sunday, February 25, 2024 4:15 PM To: lfoppiano/streamlit-pdf-viewer @.> Cc: mail @.>; Mention @.> Subject: Re: [lfoppiano/streamlit-pdf-viewer] pdf not showing (Issue #37)
This is likely a regression from #28https://github.com/lfoppiano/streamlit-pdf-viewer/issues/28. If you revert to version 0.0.7 it should work, however, the application will use more CPU because of an infinite loop in the frontend.
— Reply to this email directly, view it on GitHubhttps://github.com/lfoppiano/streamlit-pdf-viewer/issues/37#issuecomment-1963116949, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BA2JSEZI2NEWMZHEFCPHWYLYVPHZXAVCNFSM6AAAAABDYMY2YSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRTGEYTMOJUHE. You are receiving this because you were mentioned.Message ID: @.**@.>>
@trbtl Unfortunately, the issue is not related to the browser, it's a regression from #28 which we did not notice in our demo tests. We are working already on a solution, and we will have integration tests trying to spot those situations in future. Leave this issue open and we will update you when a new release will solve this issue.
Thank you so much! I don’t think I’ve ever had such quick and helpful response. Keep up the good work.
Thanks Bob
From: Luca Foppiano @.> Sent: Sunday, February 25, 2024 4:44 PM To: lfoppiano/streamlit-pdf-viewer @.> Cc: mail @.>; Mention @.> Subject: Re: [lfoppiano/streamlit-pdf-viewer] pdf not showing (Issue #37)
@trbtlhttps://github.com/trbtl Unfortunately, the issue is not related to the browser, it's a regression from #28https://github.com/lfoppiano/streamlit-pdf-viewer/issues/28 which we did not notice in our demo tests. We are working already on a solution, and we will have integration tests trying to spot those situations in future. Leave this issue open and we will update you when a new release will solve this issue.
— Reply to this email directly, view it on GitHubhttps://github.com/lfoppiano/streamlit-pdf-viewer/issues/37#issuecomment-1963133775, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BA2JSE5BEEAHEIGURIOHGDDYVPLFBAVCNFSM6AAAAABDYMY2YSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRTGEZTGNZXGU. You are receiving this because you were mentioned.Message ID: @.**@.>>
Now the problem is a problem with displaying a pdf in Streamlit Cloud. The pdf displays correctly when I run it locally, but no luck with displaying it on Streamlit Cloud. I opened an issue #43 - https://github.com/lfoppiano/streamlit-pdf-viewer/issues/43 Any ideas?
Thanks Bob
From: Bob Cole @.> Sent: Sunday, February 25, 2024 4:35 PM To: lfoppiano/streamlit-pdf-viewer @.>; lfoppiano/streamlit-pdf-viewer @.> Cc: mail @.>; Mention @.***> Subject: RE: [lfoppiano/streamlit-pdf-viewer] pdf not showing (Issue #37)
That works! What is it about version 0.0.8 that is a problem with chromium browsers? Will this be an issue going forward?
Thanks Bob
From: Luca Foppiano @.**@.>> Sent: Sunday, February 25, 2024 4:15 PM To: lfoppiano/streamlit-pdf-viewer @.**@.>> Cc: mail @.**@.>>; Mention @.**@.>> Subject: Re: [lfoppiano/streamlit-pdf-viewer] pdf not showing (Issue #37)
This is likely a regression from #28https://github.com/lfoppiano/streamlit-pdf-viewer/issues/28. If you revert to version 0.0.7 it should work, however, the application will use more CPU because of an infinite loop in the frontend.
— Reply to this email directly, view it on GitHubhttps://github.com/lfoppiano/streamlit-pdf-viewer/issues/37#issuecomment-1963116949, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BA2JSEZI2NEWMZHEFCPHWYLYVPHZXAVCNFSM6AAAAABDYMY2YSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRTGEYTMOJUHE. You are receiving this because you were mentioned.Message ID: @.**@.>>
I just published version 0.0.9 which should solve the issues you've reported.
At your earliest convenience, could you give it a try and let me know?
I’m creating a simple pdf viewer. See the code below. When I click on a button the first time nothing is displayed. When I click on it a second time thh pdf is displayed. What am I doing wrong?