streamlit-pdf-viewer
Streamlit component for PDF visualisation and manipulation
What it is and what it does
streamlit-pdf-viewer is a Streamlit custom component that embeds PDF rendering directly into web applications using the pdf.js library. It allows you to display PDF files with interactive controls—zoom, page navigation, and scrolling—and overlay annotations on top of the document. The component supports rendering text on PDFs for copy-paste functionality, custom callbacks when annotations are clicked, and configurable layout options like alignment and page separators.
The package is lightweight, requiring only streamlit as a runtime dependency, and installs with low friction. However, it is maintained as a side project and explicitly remains in active development; the documentation notes known limitations (Firefox and Chrome only, potential slowness with complex PDFs due to Streamlit's reload behavior) and cautions that troubleshooting may be slow. A specific Streamlit version range (1.41–1.58) has a regression that breaks scroll position after dialogs close; the maintainer recommends Streamlit ≥1.59.0.
Use it for:
- Embed PDF documents in Streamlit dashboards or data applications without requiring users to download files.
- Build document review or annotation tools where users can mark up PDFs and trigger callbacks on interaction.
- Display multi-page reports or technical documentation with zoom and navigation controls within a Streamlit UI.
- Create document processing pipelines that visualize PDFs alongside extracted data or analysis results.
- Render text-based PDFs with copy-paste support for data extraction workflows.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Streamlit component that renders PDF documents in web applications with annotations, zoom controls, and interactive navigation.
Yes, if you need to display PDFs in a Streamlit app and can tolerate active-development limitations. Install friction is low and the component is actively maintained. However, verify the license status in the repository, test with your target Streamlit version (avoid 1.41–1.58), and be aware that complex PDFs may render slowly due to Streamlit's reload behavior. Not recommended for production use cases requiring guaranteed stability or fast troubleshooting response.
Install
streamlit-pdf-viewer on PyPI
pip
pip install streamlit-pdf-vieweruv
uv add streamlit-pdf-viewerpoetry
poetry add streamlit-pdf-viewerInstalling streamlit-pdf-viewer
Before you install
Low install friction with a single runtime dependency on streamlit. Active maintenance with recent releases; however, the project is explicitly described as a side project where troubleshooting may take time, and the component is still in development with known bugs and limitations.
License in practice
License status is unclear—no SPDX identifier or raw license text is available in the package metadata. Verify the actual license terms in the repository before adopting in proprietary or restricted contexts.
Quickstart
pip install streamlit-pdf-viewer
import streamlit as st
from streamlit_pdf_viewer import pdf_viewer
pdf_viewer("path/to/document.pdf", width=700)
Streamlit versions 1.41–1.58 have a known regression affecting custom-component iframe scroll handling; use Streamlit ≥1.59.0 or ≤1.40.2 to avoid this issue.
Verify before relying
- Whether the package works reliably with PDF documents larger than a few megabytes or with complex layouts.
- Performance characteristics when rendering PDFs with many annotations or in Streamlit apps that reload frequently.
- Whether the annotation callback feature is production-ready or still experimental.
Package facts
| License | not declared (unclear) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — streamlit |
| Maintenance | actively maintained — 25 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 205,320/month — #9,589 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: streamlit_pdf_viewer-0.0.30-py3-none-any.whl
Tags
More Graphics packages
Pillow adds image processing capabilities to…
permissive · top 100 on PyPI
fonttoolsfonttools manipulates font files in multiple…
permissive · top 1,000 on PyPI
matplotlib-inlineEnables matplotlib figures to display inline…
permissive · top 1,000 on PyPI
pymupdfPyMuPDF extracts, renders, converts, and…
agpl · top 1,000 on PyPI
pypdfium2pypdfium2 is a Python binding to PDFium that…
permissive · top 1,000 on PyPI
altairAltair is a declarative Python library for…
permissive · top 1,000 on PyPI
streamlit-cardA Streamlit component that renders interactive…
permissive · top 15,000 on PyPI
streamlit-pdfAdds a PDF viewer component to Streamlit apps…
permissive · top 15,000 on PyPI
st-annotated-textDisplays annotated text with labels and…
permissive · top 15,000 on PyPI
gradio-pdfProvides a PDF display component for Gradio…
permissive · top 15,000 on PyPI
streamlit-image-coordinatesA Streamlit component that displays an image…
permissive · top 15,000 on PyPI
streamlit-option-menuA Streamlit component that renders a static…
unclear · top 15,000 on PyPI
streamlit-echartsRenders interactive ECharts visualizations in…
permissive · top 15,000 on PyPI
streamlit-foliumRenders interactive Folium maps in Streamlit…
unclear · top 15,000 on PyPI
streamlit-js-evalStreamlit-js-eval lets you run arbitrary…
unclear · top 15,000 on PyPI
streamlit-agraphRenders interactive network graphs in Streamlit…
unclear · top 15,000 on PyPI