tkPDFViewer
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
Metadata
Release files for tkPDFViewer2 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tkPDFViewer2-0.1.tar.gz | 4.4 kB | Without provenance | Details for tkPDFViewer2-0.1.tar.gz |
Release files / tkPDFViewer2-0.1.tar.gz
| Download URL | tkPDFViewer2-0.1.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bbe8d510119e62d64f445fd1e9ac0fc583c1823eb8b09570a1b492d361218ae8
|
|
BLAKE2b-256 checksum How to use checksums |
cc68258d1ce2eb18e1f7d613a9842cb4bc49b0be9310ea9e4c4473367dee9f26
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.12
|
Security for tkPDFViewer2 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.