Textual PDF
A Textual widget for viewing PDF files.
Installation
Install the package using your package manager:
pip install textual-pdf
uv add textual-pdf
poetry add textual-pdf
Usage
Here is a simple example of how to use the PDFViewer widget in your Textual application:
from textual.app import App, ComposeResult
from textual_pdf.pdf_viewer import PDFViewer
class PDFApp(App):
def compose(self) -> ComposeResult:
yield PDFViewer("path/to/your/document.pdf")
app = PDFApp()
app.run()
The PDFViewer class also comes with an option to switch protocols
PDFViewer supports whatever image protocols textual-image supports, which are TGP, Sixel, and Halfcell and Unicode
TGP and Sixel are the most recommended to use as they allow the clearest image to be produced. Halfcell and Unicode are not readable at all, and simply exists for the fun of it.
# use tgp
PDFViewer("path/to/your/document.pdf", protocol="TGP")
# autodetect (default)
PDFViewer("path/to/your/document.pdf", protocol="Auto")
CLI
textual-pdf is available as a CLI tool via ptf
uv tool install git+https://github.com/NSPC911/ptf
License
This project is licensed under the MIT License.
Metadata
Release files for textual-pdf 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| textual_pdf-0.1.7.tar.gz | 4.1 MB | Without provenance | Details for textual_pdf-0.1.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| textual_pdf-0.1.7-py3-none-any.whl | Python 3 | none | any | Details for textual_pdf-0.1.7-py3-none-any.whl |
Total release size: 4.1 MB
Release files / textual_pdf-0.1.7.tar.gz
| Download URL | textual_pdf-0.1.7.tar.gz |
|---|---|
| Size | 4.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
41cca4670d745eb76bc5c2323e9d149e7d1f167bde31230ee7692370d1b1c46e
|
|
BLAKE2b-256 checksum How to use checksums |
29a9cb0ffaa56891663fb48932999089cd2f6f761be68e0efc3583048c00d3fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.14
|
Release files / textual_pdf-0.1.7-py3-none-any.whl
| Download URL | textual_pdf-0.1.7-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
52af2fe17797b8ea99480a06ad05169543cbbd7001b4837197c7df30f456309e
|
|
BLAKE2b-256 checksum How to use checksums |
9813dd2ee268efd99f6489ea860219484b5900c83f5b1a664526a84b5419f47a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.14
|
Security for textual-pdf 0.1.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.