Flet pdf view for all platforms
Project description
📄 flet-pdfview
A lightweight and efficient PDF viewer component for Flet applications.
flet-pdfview provides a simple way to render PDF files inside your UI while keeping performance, stability, and user experience in mind.
✨ Features
- 🧩 Native PDF rendering inside Flet layouts.
- 📐 High-resolution rendering with custom DPI.
- 🖼️ Flexible image fitting using
BoxFit. - 📱 Fully responsive (via
expand=True). - 🚫 Silent failure for invalid paths (no crashes, no UI freezes).
- ⚡ Optimized for performance and UI stability.
📦 Installation
Install the package directly from PyPI:
pip install flet-pdfview
🚀 Basic UsagePython
from flet_pdfview import PdfColumn
from flet import Page, run, BoxFit
def main(page: Page):
page.add(
PdfColumn(
src="path/to/your/file.pdf",
expand=True,
dpi=300,
fitImage=BoxFit.FILL
)
)
run(main)
⚠️ Important Behavior
PdfColumn will not render anything if:
- The provided path does not exist.
- The file path does not end with
.pdf.
[!IMPORTANT] This behavior is intentional:
- No exceptions ❌
- No error dialogs ❌
- No UI interruption ❌
The component simply stays silent and allows the application to continue running normally.
🎯 Why Silent Failure?
This design choice ensures:
- 🛡️ Application stability: Prevents crashes due to missing files.
- 🧠 Clean Experience: A distraction-free UI for the end-user.
- 🚀 Production Ready: Predictable behavior in live environments.
In short: No valid PDF → No rendering → App remains stable.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flet_pdfview-0.1.2.tar.gz.
File metadata
- Download URL: flet_pdfview-0.1.2.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7fe17e08ec66449966b1872c001c5b86d50235c8839ef14bd5dd12a2e44366f5
|
|
| MD5 |
b71e74e87d4729bded01102807551006
|
|
| BLAKE2b-256 |
01a4a14ace2a67505bc16d28b6d9ff9287b89627da6e0911bb6ec123e594f825
|
File details
Details for the file flet_pdfview-0.1.2-py3-none-any.whl.
File metadata
- Download URL: flet_pdfview-0.1.2-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c80e53df6a62d6994f31855ba6d0f51570dda184b63e7f720e27847f6c1b0c6b
|
|
| MD5 |
48c73e7736a4f0f0dba0e5779e8af3e7
|
|
| BLAKE2b-256 |
b0449f0207ebed63321cc1e13c540053ea6c124e8e2fba4f643e6b434ce457d9
|