Skip to main content

tkPDFViewer

Powered by [Roshan]

The tkPDFViewer is python library, which allows you to embed the PDF file in your tkinter GUI. In just three steps.

  • Install
  • Import
  • Embed on your gui

Features!

  • Embed your PDF in your tkinter GUI.
  • Customize width and height of your PDF.

High quality pdf pages image with customizable width and height worked with python 2.7+.

Installation

Install tkPDFViewer using pip

pip install tkPDFViewer

Install tkPDFViewer using pip3

pip3 install tkPDFViewer

Install using git.

pip install git+"https://github.com/Roshanpaswan/tkPDFViewer/archive/0.1.zip"

Usage

An Example of Using tkPDFViewer.

from tkPDFViewer import tkPDFViewer as pdf
from tkinter import*
root = Tk()

#create object like this.
variable1 = pdf.ShowPdf()
#Add your pdf location and width and height.
variable2 = variable1.pdf_view(root,pdf_location=r"location",width=50,height=100)
variable2.pack()
root.mainloop()

Attributes

pdf_location = "" --> location of your pdf
width = 0 --> width of your pdf to be embeded
height = 0 --> height of your pdf to be embeded
To embed your pdf use --> .pack() or .grid() or .place()
bar --> True or False, Through this attribute you can hide or unhide the loading bar which showing on the frame after your gui is opened. This indicate that 'how much your pdf is loaded'.Once it complete it unhide automatically and your pdf get embeded.
load --> after or before, Through this attribute you can decide that , when your pdf object is to convert. If you select 'after' then the object of your pdf is convert after your gui is opened.Otherwise it convert first then your gui is opened. It is recommended that to select after which is default.Beacause this takes time. Depends on the size of pdf. And if you select 'before' then it make your gui slow to open. 

Dependencies

  • tkinter
  • PyMuPDF
  • Thread
  • math

License

MIT

Author

Release files for tkPDFViewer 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tkPDFViewer 0.1
File Size Uploaded
tkPDFViewer-0.1.tar.gz 3.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tkPDFViewer 0.1
File Interpreter ABI Platform
tkPDFViewer-0.1-py3-none-any.whl Python 3 none any Details

Total release size: 8.1 kB

Release files / tkPDFViewer-0.1.tar.gz

Download URL tkPDFViewer-0.1.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0fdf4bca0b16cafe82ab99905fb7cad130179c381d0139438e6eb1e2a567f436
BLAKE2b-256 checksum
How to use checksums
6dd2d4fd959e07fb5f452edddee162b654322e0ff794428009a80bbe33543f73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.5

Release files / tkPDFViewer-0.1-py3-none-any.whl

Download URL tkPDFViewer-0.1-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
da6270b0a4a3cc795867507a74691990ad908e2f6fd04b89218002cb6d18732b
BLAKE2b-256 checksum
How to use checksums
58b191128878cfab4895cc2d7588feef75cdab656522d135103ff0dceb847a33
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.5

Release history Release notifications | RSS feed

This release

0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page