skillfed

streamlit-pdf-viewer

Streamlit component for PDF visualisation and manipulation

streamlit-pdf-viewer v0.0.30 205.3K downloads/30d#9,589 on PyPI196
License unclear Active released

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-viewer

uv

uv add streamlit-pdf-viewer

poetry

poetry add streamlit-pdf-viewer

Installing 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

streamlit pdf viewerpdf display componentpdf annotation overlaystreamlit document viewerinteractive pdf renderingpdf visualization streamlitpdf.js streamlit wrapper
streamlit-componentpdf-viewerdocument-visualization

More Graphics packages