| Name | textual-pdf JSON |
| Version |
0.1.7
JSON |
| download |
| home_page | None |
| Summary | Display PDF files in textual widgets! |
| upload_time | 2025-08-31 10:04:55 |
| maintainer | None |
| docs_url | None |
| author | NSPC911 |
| requires_python | >=3.13 |
| license | None |
| keywords |
pdf
python
textual
tui
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
# Textual PDF
A Textual widget for viewing PDF files.
## Installation
Install the package using your package manager:
```sh
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:
```python
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.
```py
# 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.
Raw data
{
"_id": null,
"home_page": null,
"name": "textual-pdf",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.13",
"maintainer_email": null,
"keywords": "pdf, python, textual, tui",
"author": "NSPC911",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/29/a9/cb0ffaa56891663fb48932999089cd2f6f761be68e0efc3583048c00d3fc/textual_pdf-0.1.7.tar.gz",
"platform": null,
"description": "# Textual PDF\n\nA Textual widget for viewing PDF files.\n\n## Installation\n\nInstall the package using your package manager:\n\n```sh\npip install textual-pdf\nuv add textual-pdf\npoetry add textual-pdf\n```\n\n## Usage\n\nHere is a simple example of how to use the `PDFViewer` widget in your Textual application:\n\n```python\nfrom textual.app import App, ComposeResult\nfrom textual_pdf.pdf_viewer import PDFViewer\n\nclass PDFApp(App):\n def compose(self) -> ComposeResult:\n yield PDFViewer(\"path/to/your/document.pdf\")\n\napp = PDFApp()\napp.run()\n```\n\nThe `PDFViewer` class also comes with an option to switch protocols\n\n`PDFViewer` supports whatever image protocols `textual-image` supports, which are `TGP`, `Sixel`, and `Halfcell` and `Unicode`\n\n`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.\n\n```py\n# use tgp\nPDFViewer(\"path/to/your/document.pdf\", protocol=\"TGP\")\n# autodetect (default)\nPDFViewer(\"path/to/your/document.pdf\", protocol=\"Auto\")\n```\n\n## CLI\n\n`textual-pdf` is available as a CLI tool via `ptf`\n```\nuv tool install git+https://github.com/NSPC911/ptf\n```\n\n## License\n\nThis project is licensed under the MIT License.\n",
"bugtrack_url": null,
"license": null,
"summary": "Display PDF files in textual widgets!",
"version": "0.1.7",
"project_urls": {
"Issues": "https://github.com/NSPC911/textual-pdf/issues",
"Source": "https://github.com/NSPC911/textual-pdf"
},
"split_keywords": [
"pdf",
" python",
" textual",
" tui"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "9813dd2ee268efd99f6489ea860219484b5900c83f5b1a664526a84b5419f47a",
"md5": "8906c082335f80a1f47e3121d945fbd6",
"sha256": "52af2fe17797b8ea99480a06ad05169543cbbd7001b4837197c7df30f456309e"
},
"downloads": -1,
"filename": "textual_pdf-0.1.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8906c082335f80a1f47e3121d945fbd6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.13",
"size": 4987,
"upload_time": "2025-08-31T10:04:22",
"upload_time_iso_8601": "2025-08-31T10:04:22.204261Z",
"url": "https://files.pythonhosted.org/packages/98/13/dd2ee268efd99f6489ea860219484b5900c83f5b1a664526a84b5419f47a/textual_pdf-0.1.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "29a9cb0ffaa56891663fb48932999089cd2f6f761be68e0efc3583048c00d3fc",
"md5": "c57834b93e70c04c28c8eff5d3dd64f0",
"sha256": "41cca4670d745eb76bc5c2323e9d149e7d1f167bde31230ee7692370d1b1c46e"
},
"downloads": -1,
"filename": "textual_pdf-0.1.7.tar.gz",
"has_sig": false,
"md5_digest": "c57834b93e70c04c28c8eff5d3dd64f0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.13",
"size": 4096504,
"upload_time": "2025-08-31T10:04:55",
"upload_time_iso_8601": "2025-08-31T10:04:55.891874Z",
"url": "https://files.pythonhosted.org/packages/29/a9/cb0ffaa56891663fb48932999089cd2f6f761be68e0efc3583048c00d3fc/textual_pdf-0.1.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-31 10:04:55",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "NSPC911",
"github_project": "textual-pdf",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "textual-pdf"
}