--- id: gradio-pdf version: "0.0.24" license: Apache-2.0 license_treatment: permissive maintenance: aging --- # gradio-pdf — Easily display PDFs in Gradio License: permissive · Maintenance: aging · Downloads: 149.8K/mo ## 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 above — 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 pip install gradio-pdf uv add gradio-pdf 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_current - Install friction: low - Maintenance: aging - Downloads: 149.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags pdf viewer gradio component, display pdf in gradio, gradio custom pdf component, pdf input output gradio, document viewer web ui, pdf rendering gradio app, gradio-component, document-processing [View on SkillFed](https://skillfed.io/packages/gradio-pdf) · [View on PyPI](https://pypi.org/project/gradio-pdf/)