Skip to main content

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 :

TkPDF_Exemple

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

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tkpdfwidget-1.0.tar.gz (21.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tkpdfwidget-1.0-py3-none-any.whl (20.1 kB view details)

Uploaded Python 3

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

Hashes for tkpdfwidget-1.0.tar.gz
Algorithm Hash digest
SHA256 d571935571fe82d40cb5fccbb9d7e27cc1d756a9d42e90954093e3213f6ca033
MD5 1914ef83e602814b112374604a4d7310
BLAKE2b-256 3f2b8b4cb8f5b47a70b19223440a790569a027ff6ba21e9a259f97ea9a23c8d6

See more details on using hashes here.

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

Hashes for tkpdfwidget-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 86c9e732e6e1767282b5c685592febbd320b63dc88c97b03fdea63dc47ff9a18
MD5 b6bcc63861a3daa49b5ec744aef2c711
BLAKE2b-256 9570caa18060de5b9428e14d10b4fae837b4649fd5c7dd3935f7c7163cb39a52

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page