lfoppiano / streamlit-pdf-viewer

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

PDF is not shown when the viewer is called without parameters #35

Closed lfoppiano closed 2 months ago

lfoppiano commented 4 months ago

Check tests in #34, no PDF document is shown if the pdf_viewer is called without any parameters (except the file, indeed)

Another tests, in lfoppiano/structure-vision, if you change the pdf_viewer call as follows:

        pdf_viewer(
            input=st.session_state['binary'],
       )
lfoppiano commented 4 months ago

The issue seems to be due to the 'height': 'auto' which is set when the height is not specified. The iframe is probably created with height: 0 and, in my hypothesis, the heigh is supposed to be modified when items are added to the DOM.

lfoppiano commented 3 months ago

The PR #38 should have solved this issue.