diff --git a/streamlit_pdf_viewer/__init__.py b/streamlit_pdf_viewer/__init__.py index 058ae81b..59af9ef1 100644 --- a/streamlit_pdf_viewer/__init__.py +++ b/streamlit_pdf_viewer/__init__.py @@ -25,9 +25,9 @@ ) -def pdf_viewer(input: Union[str, Path, bytes], - width: int = 700, - height: int = None, +def pdf_viewer(input: Union[str, Path, bytes], + width: int = 700, + height: int = None, key=None, annotations: list = (), pages_vertical_spacing: int = 2, @@ -70,9 +70,11 @@ def pdf_viewer(input: Union[str, Path, bytes], binary = fo.read() else: binary = input - + if rendering == RENDERING_IFRAME or rendering == RENDERING_EMBED: - if height is None: + print(f"{RENDERING_IFRAME} and {RENDERING_EMBED} may not work consistently on all browsers " + f"they might disapper in future releases.") + if height is None: height = "100%" base64_pdf = base64.b64encode(binary).decode('utf-8')