{"id":24662,"library":"streamlit-pdf","title":"Streamlit PDF Viewer","description":"A Streamlit custom component that renders PDF files directly in the browser. Version 2.0.1 supports embedded viewing, page navigation, and zoom controls. Maintained by the community with monthly releases.","status":"active","version":"2.0.1","language":"python","source_language":"en","source_url":"https://github.com/streamlit-pdf/streamlit-pdf","tags":["streamlit","pdf","component","viewer"],"install":[{"cmd":"pip install streamlit-pdf","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required to run the component as a Streamlit app","package":"streamlit","optional":false}],"imports":[{"wrong":"from streamlit_pdf import st_pdf","symbol":"pdf_viewer","correct":"from streamlit_pdf import pdf_viewer"}],"quickstart":{"code":"import streamlit as st\nfrom streamlit_pdf import st_pdf\n\nst.title(\"PDF Viewer\")\n\n# Example: load PDF from URL\npdf_url = \"https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf\"\n\n# Or from local file: open('example.pdf', 'rb')\nst_pdf(pdf_url, width=700, height=900)","lang":"python","description":"Minimal example to display a PDF from a URL."},"warnings":[{"fix":"Replace `from streamlit_pdf import render_pdf` with `from streamlit_pdf import st_pdf`.","message":"Version 2.x majorly changed the API. The function `render_pdf` from 1.x is removed. Use `st_pdf` instead.","severity":"breaking","affected_versions":"<=1.x"},{"fix":"Use `open('file.pdf', 'rb').read()` for local files or a string URL.","message":"Local file paths must be passed as bytes or as a string path. If you pass a string URL, it is fetched; if you pass a Path object, it may fail.","severity":"gotcha","affected_versions":"all"},{"fix":"Apply custom CSS via `st.markdown` or use Streamlit's `st.columns` to control layout.","message":"The `height` parameter in version 2.x might be ignored in some Streamlit builds; use CSS styling instead.","severity":"deprecated","affected_versions":"2.0.0 - 2.0.1"}],"env_vars":null,"search_vec":"'2.0.1':17 'browser':15 'communiti':29 'compon':7,35 'control':25 'custom':6 'direct':12 'embed':19 'file':11 'maintain':26 'month':31 'navig':22 'page':21 'pdf':2,10,34 'releas':32 'render':9 'streamlit':1,5,33 'support':18 'version':16 'view':20 'viewer':3,36 'zoom':24","created_at":"2026-05-01T08:14:16.377944+00:00","updated_at":"2026-05-01T08:14:16.377944+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"2.0.1","cli_name":"","cli_version":null,"type":"library","homepage":"https://streamlit.io","github":"https://github.com/streamlit/streamlit","docs":null,"changelog":null,"pypi":"https://pypi.org/project/streamlit-pdf/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["web-framework"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-08-02","install_tag":null}}