lfoppiano / streamlit-pdf-viewer

Streamlit PDF viewer
https://structure-vision.streamlit.app/
Apache License 2.0
62 stars 3 forks source link

Problems displaying pdf in Streamlit Cloud #43

Closed trbtl closed 2 months ago

trbtl commented 3 months ago

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. Any ideas?

lfoppiano commented 3 months ago

could you share which browser you're using and, if possible, the url on the streamlit cloud?

trbtl commented 3 months ago

I'm using the chrome browser as it is widely used. I've deployed to both the Streamlit and Azure cloud to see if it was provider specific issue,, but no joy on either one. The Git repository is: https://github.com/trbtl/trbtl Streamlit cloud: https://kidneychat.streamlit.app/ Azure cloud: https://kidneychat.azurewebsites.net/

A little context: We are a nonprofit group called The Road Back To Life. We provide support and help for kidney disease patients through Support Group meetings via Zoom as well as personal mentoring. We have a social media presence and our website at https://www.kidneysupportgroup.org/. This chat app is another possible avenue we'd like to make availabile to people who have questions about kidney disease. Thank you, Bob

trbtl commented 3 months ago

I'm sorry, the specific pages are: https://github.com/trbtl/trbtl/blob/main/pages/4_References.py https://kidneychat.azurewebsites.net/References https://kidneychat.streamlit.app/References

Thanks, Bob

trbtl commented 3 months ago

I'm using the chrome browser as it is widely used. I've deployed to both the Streamlit and Azure cloud to see if it was provider specific issue,, but no joy on either one. The Git repository is: https://github.com/trbtl/trbtl Streamlit cloud: https://kidneychat.streamlit.app/ Azure cloud: https://kidneychat.azurewebsites.net/ The specific pages are: https://github.com/trbtl/trbtl/blob/main/pages/4_References.py https://kidneychat.azurewebsites.net/References https://kidneychat.streamlit.app/References A little context: We are a nonprofit group called The Road Back To Life. We provide support and help for kidney disease patients through Support Group meetings via Zoom as well as personal mentoring. We have a social media presence and our website at https://www.kidneysupportgroup.org/. This chat app is another possible avenue we'd like to make availabile to people who have questions about kidney disease. Thank you, Bob

From: Luca Foppiano @.> Sent: Monday, March 11, 2024 4:22 AM To: lfoppiano/streamlit-pdf-viewer @.> Cc: mail @.>; Author @.> Subject: Re: [lfoppiano/streamlit-pdf-viewer] Problems displaying pdf in Streamlit Cloud (Issue #43)

could you share which browser you're using and, if possible, the url on the streamlit cloud?

— Reply to this email directly, view it on GitHubhttps://github.com/lfoppiano/streamlit-pdf-viewer/issues/43#issuecomment-1988207699, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BA2JSE6YM735FMBQW6DO6PDYXWHULAVCNFSM6AAAAABEOHBYJKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBYGIYDONRZHE. You are receiving this because you authored the thread.Message ID: @.**@.>>

lfoppiano commented 3 months ago

Hi @trbtl, thanks for sharing the details.

I apologise, in this period I cannot work on this project full time so all fixes are delayed, as I would prefer to merge them once they are reviewed.

I believe that the PR #38 should solve your problem.

In the meantime, I can suggest you some ways to try to make it work with version 0.0.7. I think that if you specify the height you should be able to see the PDF with Chrome. I did not test it, I based this suggestion on the fact that the tests that are failing on the main branch using chromium (we can approximate it to Chrome) are the ones where the pdf_viewer is called without height argument.

lfoppiano commented 3 months ago

I tested with Brave browser and Chromium (I don't have Chrome, unfortunately) and I could not reproduce the same issue you had. @trbtl did you have any luck in providing the height parameter?

trbtl commented 3 months ago

Yes, I set a height, and it appears to work. I’m working on finding the optimal setting that works with different screen sizes. I’ll let you know how it goes.

Thank you, Bob

From: Luca Foppiano @.> Sent: Thursday, March 14, 2024 10:42 PM To: lfoppiano/streamlit-pdf-viewer @.> Cc: mail @.>; Mention @.> Subject: Re: [lfoppiano/streamlit-pdf-viewer] Problems displaying pdf in Streamlit Cloud (Issue #43)

I tested with Brave browser and Chromium (I don't have Chrome, unfortunately) and I could not reproduce the same issue you had. @trbtlhttps://github.com/trbtl did you have any luck in providing the height parameter?

— Reply to this email directly, view it on GitHubhttps://github.com/lfoppiano/streamlit-pdf-viewer/issues/43#issuecomment-1998981375, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BA2JSE5LITCOAX3SMDENMDDYYKC4BAVCNFSM6AAAAABEOHBYJKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJYHE4DCMZXGU. You are receiving this because you were mentioned.Message ID: @.**@.>>

lfoppiano commented 3 months ago

With 0.0.9, without the height parameter, it should work, but to confirm could you give it a try?

trbtl commented 3 months ago

I’ll give it a try and let you know how it goes.

-Bob

From: Luca Foppiano @.> Sent: Tuesday, March 19, 2024 4:26 AM To: lfoppiano/streamlit-pdf-viewer @.> Cc: mail @.>; Mention @.> Subject: Re: [lfoppiano/streamlit-pdf-viewer] Problems displaying pdf in Streamlit Cloud (Issue #43)

With 0.0.9, without the height parameter, it should work, but to confirm could you give it a try?

— Reply to this email directly, view it on GitHubhttps://github.com/lfoppiano/streamlit-pdf-viewer/issues/43#issuecomment-2006931664, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BA2JSE27WMVMVIICLBCCB7LYZAOFPAVCNFSM6AAAAABEOHBYJKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBWHEZTCNRWGQ. You are receiving this because you were mentioned.Message ID: @.**@.>>

trbtl commented 3 months ago

Luca,

I’m sorry, after upgrading to 0.0.9, we’re back to the original issue of some pdfs won’t display unless you click on the calling button a second time. Setting a height seems to cure the issue like before. Thank you for your effort, I’d be happy to continue testing anything you want.

-Bob

From: Luca Foppiano @.> Sent: Tuesday, March 19, 2024 4:26 AM To: lfoppiano/streamlit-pdf-viewer @.> Cc: mail @.>; Mention @.> Subject: Re: [lfoppiano/streamlit-pdf-viewer] Problems displaying pdf in Streamlit Cloud (Issue #43)

With 0.0.9, without the height parameter, it should work, but to confirm could you give it a try?

— Reply to this email directly, view it on GitHubhttps://github.com/lfoppiano/streamlit-pdf-viewer/issues/43#issuecomment-2006931664, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BA2JSE27WMVMVIICLBCCB7LYZAOFPAVCNFSM6AAAAABEOHBYJKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBWHEZTCNRWGQ. You are receiving this because you were mentioned.Message ID: @.**@.>>

lfoppiano commented 3 months ago

@trbtl Thanks for testing quickly.
The height being necessary is a separate issue I will deal with in #41.

lfoppiano commented 3 months ago

@trbtl I've released version 0.0.10, it should resolve the problem occurring when the height is not specified. Could you try it out, please?

trbtl commented 3 months ago

Will do.

Thanks Bob

From: Luca Foppiano @.> Sent: Saturday, March 30, 2024 3:47 PM To: lfoppiano/streamlit-pdf-viewer @.> Cc: mail @.>; Mention @.> Subject: Re: [lfoppiano/streamlit-pdf-viewer] Problems displaying pdf in Streamlit Cloud (Issue #43)

@trbtlhttps://github.com/trbtl I've released version 0.0.10, it should resolve the problem occurring when the height is not specified. Could you try it out, please?

— Reply to this email directly, view it on GitHubhttps://github.com/lfoppiano/streamlit-pdf-viewer/issues/43#issuecomment-2028487440, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BA2JSE42YHWNV625BOZDVNLY246GJAVCNFSM6AAAAABEOHBYJKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRYGQ4DONBUGA. You are receiving this because you were mentioned.Message ID: @.**@.>>

trbtl commented 2 months ago

Luca,

It works! WoHoo! Thank you! You can check it out at https://kidneyfaq.streamlit.app/.

Request: If you get a chance, my only wish to improve the tool is to have the hyperlinks work. I know you’re very busy so consider this a wish 😊,

Thanks again, Bob

From: Luca Foppiano @.> Sent: Saturday, March 30, 2024 3:47 PM To: lfoppiano/streamlit-pdf-viewer @.> Cc: mail @.>; Mention @.> Subject: Re: [lfoppiano/streamlit-pdf-viewer] Problems displaying pdf in Streamlit Cloud (Issue #43)

@trbtlhttps://github.com/trbtl I've released version 0.0.10, it should resolve the problem occurring when the height is not specified. Could you try it out, please?

— Reply to this email directly, view it on GitHubhttps://github.com/lfoppiano/streamlit-pdf-viewer/issues/43#issuecomment-2028487440, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BA2JSE42YHWNV625BOZDVNLY246GJAVCNFSM6AAAAABEOHBYJKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRYGQ4DONBUGA. You are receiving this because you were mentioned.Message ID: @.**@.>>

lfoppiano commented 2 months ago

Great. Thanks for testing it.

BTW I've added a new task for the hyperlink #44.