Skip to content

Commit

Permalink
add notice about deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
lfoppiano committed Apr 3, 2024
1 parent be53b47 commit 3c11c8a
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions streamlit_pdf_viewer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -70,9 +70,12 @@ 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:
console.warn(f"{RENDERING_IFRAME} and {RENDERING_EMBED} are deprecated. "
f"They do not work consistently on all browswer "
f"and will be removed in a future release.")
if height is None:
height = "100%"

base64_pdf = base64.b64encode(binary).decode('utf-8')
Expand Down

0 comments on commit 3c11c8a

Please sign in to comment.