A Pdf file reader in a tkinter's Frame, behaving like a widget
Project description
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 :
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
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 :
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 :
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 tkpdfwidget-1.0.tar.gz.
File metadata
- Download URL: tkpdfwidget-1.0.tar.gz
- Upload date:
- Size: 21.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d571935571fe82d40cb5fccbb9d7e27cc1d756a9d42e90954093e3213f6ca033
|
|
| MD5 |
1914ef83e602814b112374604a4d7310
|
|
| BLAKE2b-256 |
3f2b8b4cb8f5b47a70b19223440a790569a027ff6ba21e9a259f97ea9a23c8d6
|
File details
Details for the file tkpdfwidget-1.0-py3-none-any.whl.
File metadata
- Download URL: tkpdfwidget-1.0-py3-none-any.whl
- Upload date:
- Size: 20.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86c9e732e6e1767282b5c685592febbd320b63dc88c97b03fdea63dc47ff9a18
|
|
| MD5 |
b6bcc63861a3daa49b5ec744aef2c711
|
|
| BLAKE2b-256 |
9570caa18060de5b9428e14d10b4fae837b4649fd5c7dd3935f7c7163cb39a52
|