Name | TkPdfWidget JSON |
Version |
1.0
JSON |
| download |
home_page | None |
Summary | A Pdf file reader in a tkinter's Frame, behaving like a widget |
upload_time | 2025-08-06 08:31:56 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | None |
keywords |
tkinter
pdf
widget
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
**_TkPdfWidget_** is a python librairy extending **_tkinter_** with a PDF file reader widget.
Here is an exemple of how it looks like in a minimalist tkinter window :
<img width="316" height="398" alt="TkPDF_Exemple" src="https://github.com/user-attachments/assets/dc44a4e1-4031-4b6e-92d0-a24a90c11e63" />
## **Intallation** ##
Download the latest package on github or, using pip :
> pip install TkPdfWidget
## **Features :** ##
* Several viewing modes (full width, full page, real size and free move)
* zoom in / out, horizontal and vertical scroll
* 90° pages rotation
* easy access to any page of a document
* keyboard shortcuts (wip)
## **Known alternatives :** ##
Do not hesitate to have a look to these other projects that may better suit your needs
* [CTkPDFViewer](https://github.com/Akascape/CTkPDFViewer)
* [tkPDFViewer](https://pypi.org/project/tkPDFViewer/)
## **How does it work ?** ##
You can use this Pdf reader like you would for any standard tkinter's widget.
It got the same options and methods than a Frame widget, with a few additions :
* **Two options at instantiation :** defaultMode (default viewing mode) and filepath (automatic call to the load method below)
* **One public method** : load (load a new pdf document in the reader)
**_Here is a quick exemple :_**
```python
from tkinter import Tk
from TkPdfWidget import PdfReader
tk = Tk()
tk.title("simple example")
reader = PdfReader(tk, width=500, height=600, fp="CodeCivil.pdf")
reader.pack()
tk.mainloop()
```
## **Dependancies :** ##
* **_tkinter_** (obviously)
* [Pillow](https://pillow.readthedocs.io)
* [pymupdf](https://pymupdf.readthedocs.io)
Raw data
{
"_id": null,
"home_page": null,
"name": "TkPdfWidget",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "tkinter, pdf, widget",
"author": null,
"author_email": "\"Louis \\\"Itreza\\\" Bossy\" <louis.bossy@etu.univ-tours.fr>",
"download_url": "https://files.pythonhosted.org/packages/3f/2b/8b4cb8f5b47a70b19223440a790569a027ff6ba21e9a259f97ea9a23c8d6/tkpdfwidget-1.0.tar.gz",
"platform": null,
"description": "**_TkPdfWidget_** is a python librairy extending **_tkinter_** with a PDF file reader widget.\r\n\r\nHere is an exemple of how it looks like in a minimalist tkinter window :\r\n\r\n<img width=\"316\" height=\"398\" alt=\"TkPDF_Exemple\" src=\"https://github.com/user-attachments/assets/dc44a4e1-4031-4b6e-92d0-a24a90c11e63\" />\r\n\r\n\r\n## **Intallation** ##\r\n\r\nDownload the latest package on github or, using pip :\r\n> pip install TkPdfWidget\r\n\r\n## **Features :** ##\r\n\r\n* Several viewing modes (full width, full page, real size and free move)\r\n* zoom in / out, horizontal and vertical scroll\r\n* 90\u00b0 pages rotation\r\n* easy access to any page of a document\r\n* keyboard shortcuts (wip)\r\n\r\n\r\n## **Known alternatives :** ##\r\n\r\nDo not hesitate to have a look to these other projects that may better suit your needs\r\n* [CTkPDFViewer](https://github.com/Akascape/CTkPDFViewer)\r\n* [tkPDFViewer](https://pypi.org/project/tkPDFViewer/)\r\n\r\n\r\n## **How does it work ?** ##\r\n\r\nYou can use this Pdf reader like you would for any standard tkinter's widget.\r\nIt got the same options and methods than a Frame widget, with a few additions :\r\n* **Two options at instantiation :** defaultMode (default viewing mode) and filepath (automatic call to the load method below)\r\n* **One public method** : load (load a new pdf document in the reader)\r\n\r\n**_Here is a quick exemple :_**\r\n\r\n```python\r\nfrom tkinter import Tk\r\nfrom TkPdfWidget import PdfReader\r\n\r\ntk = Tk()\r\ntk.title(\"simple example\")\r\nreader = PdfReader(tk, width=500, height=600, fp=\"CodeCivil.pdf\")\r\nreader.pack()\r\ntk.mainloop()\r\n```\r\n\r\n\r\n## **Dependancies :** ##\r\n\r\n* **_tkinter_** (obviously)\r\n* [Pillow](https://pillow.readthedocs.io)\r\n* [pymupdf](https://pymupdf.readthedocs.io)\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n",
"bugtrack_url": null,
"license": null,
"summary": "A Pdf file reader in a tkinter's Frame, behaving like a widget",
"version": "1.0",
"project_urls": null,
"split_keywords": [
"tkinter",
" pdf",
" widget"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "9570caa18060de5b9428e14d10b4fae837b4649fd5c7dd3935f7c7163cb39a52",
"md5": "b6bcc63861a3daa49b5ec744aef2c711",
"sha256": "86c9e732e6e1767282b5c685592febbd320b63dc88c97b03fdea63dc47ff9a18"
},
"downloads": -1,
"filename": "tkpdfwidget-1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b6bcc63861a3daa49b5ec744aef2c711",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 20140,
"upload_time": "2025-08-06T08:31:55",
"upload_time_iso_8601": "2025-08-06T08:31:55.648577Z",
"url": "https://files.pythonhosted.org/packages/95/70/caa18060de5b9428e14d10b4fae837b4649fd5c7dd3935f7c7163cb39a52/tkpdfwidget-1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "3f2b8b4cb8f5b47a70b19223440a790569a027ff6ba21e9a259f97ea9a23c8d6",
"md5": "1914ef83e602814b112374604a4d7310",
"sha256": "d571935571fe82d40cb5fccbb9d7e27cc1d756a9d42e90954093e3213f6ca033"
},
"downloads": -1,
"filename": "tkpdfwidget-1.0.tar.gz",
"has_sig": false,
"md5_digest": "1914ef83e602814b112374604a4d7310",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 21788,
"upload_time": "2025-08-06T08:31:56",
"upload_time_iso_8601": "2025-08-06T08:31:56.757621Z",
"url": "https://files.pythonhosted.org/packages/3f/2b/8b4cb8f5b47a70b19223440a790569a027ff6ba21e9a259f97ea9a23c8d6/tkpdfwidget-1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-06 08:31:56",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "tkpdfwidget"
}