skillfed

gradio-pdf

Easily display PDFs in Gradio

gradio-pdf v0.0.24 149.8K downloads/30d#10,988 on PyPI44
Permissive license Apache-2.0 AGING released

What it is and what it does

gradio_pdf is a custom component that extends Gradio with a PDF display and input element. It wraps PDF rendering into a Gradio component that can be used in interfaces and blocks, accepting a file path and displaying the PDF in the browser. The component supports standard Gradio features like labels, visibility toggling, and event handlers (change and upload events), making it straightforward to integrate PDF handling into document-processing pipelines.

The package depends only on gradio and is designed as a thin wrapper around PDF display. It exposes a PDF component with configurable height, starting_page, and standard Gradio container options. The component preprocesses input as a string (file path) and can be used both as an input to capture user-uploaded PDFs and as an output to display results from backend processing.

Use it for:

  • Build a document question-answering interface where users upload a PDF and ask questions about its content.
  • Create a form-processing UI that displays a PDF document alongside input fields for data extraction.
  • Display generated or processed PDFs as output in a Gradio app without leaving the web interface.
  • Prototype invoice or receipt processing workflows with side-by-side PDF and result display.
  • Integrate PDF upload and display into scientific or data analysis applications built with Gradio.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides a PDF display component for Gradio applications, allowing you to render PDF files in web-based UIs.

Yes, if you are building a Gradio application that needs to display or accept PDFs. The low install friction, permissive license, and straightforward API make it a practical choice for document-centric UIs. The alpha status and 261 days since last release mean you should test it against your specific Gradio version and PDF use cases before relying on it in production, but there are no known vulnerabilities and the core functionality is stable.

Install

gradio-pdf on PyPI

pip

pip install gradio-pdf

uv

uv add gradio-pdf

poetry

poetry add gradio-pdf

Installing gradio-pdf

Before you install

Low friction installation with a single runtime dependency on gradio. The package is in alpha status and hasn't been updated in 261 days, so maintenance momentum is limited but the repository remains active and unarchived.

License in practice

Licensed under Apache-2.0 (permissive), so you can use it freely in commercial and open-source projects without significant legal restrictions.

Quickstart

pip install gradio_pdf

import gradio as gr
from gradio_pdf import PDF

demo = gr.Interface(
    fn=lambda doc: doc,
    inputs=PDF(label="Document"),
    outputs="text"
)

if __name__ == "__main__":
    demo.launch()

Requires Python >= 3.10

Verify before relying

  • Whether the PDF component supports interactive features beyond display (e.g., annotation, form filling, search).
  • Performance characteristics when handling large PDF files or batch operations.
  • Compatibility with specific gradio versions beyond the stated Python version support.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 1 — gradio
Maintenance aging — 261 days since the last release
Last repo commit
First released
Downloads 149,755/month — #10,988 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: gradio_pdf-0.0.24-py3-none-any.whl

Keywords: Document QA, Documents, PDF, gradio, gradio custom component, gradio-template-Fallback

Development Status :: 3 - AlphaLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Scientific/EngineeringTopic :: Scientific/Engineering :: Artificial IntelligenceTopic :: Scientific/Engineering :: Visualization

Tags

pdf viewer gradio componentdisplay pdf in gradiogradio custom pdf componentpdf input output gradiodocument viewer web uipdf rendering gradio app
gradio-componentdocument-processing

More Scientific/Engineering packages