Gradio component to display PDF files and extract text within Gradio apps. Currently at version 0.0.24, with a pre-1.0 release cadence. Requires Python >=3.10.
Install & Compatibility
Where this runs
tested against v0.0.24 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 9.770s · 326.3MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 18.0s · import 8.790s · 320MB
338MB installed
● package 338MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Correct class name is PDF (uppercase), not Pdf.
from gradio_pdf import PDF
Simple Gradio app with PDF component (placeholder; see official docs for full PDF usage).
import gradio as gr
from gradio_pdf import PDF
def greet(name):
return f"Hello {name}!"
with gr.Blocks() as demo:
name = gr.Textbox(label="Name")
output = gr.Textbox(label="Output")
greet_btn = gr.Button("Greet")
greet_btn.click(fn=greet, inputs=name, outputs=output)
demo.launch()
Upgrade
Version history
Breaking-change detection hasn't run for this library yet.
Audit
Security & dependencies
CVE tracking and dependency tree are planned for a later release.