Skip to main content

The tkinterPdfViewer is python library, which allows you to embed the PDF file in your tkinter GUI

Project description

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.
  • Zoom in and zoom out you pdf with shortcuts like ctrl+mousewheel or ctrl+ or ctrl-
  • Open Encrypted PDFs

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

Installation

Install tkPDFViewer using pip

pip install tkinterPdfViewer

Install tkPDFViewer using pip3

pip3 install tkinterPdfViewer

Usage

An Example of Using tkinterPdfViewer.

from tkinterPdfViewer import tkinterPdfViewer as pdf
import tkinter as tk

root = tk.Tk()
root.geometry("700x780")
d = pdf.ShowPdf().pdf_view(root, pdf_location=r"location", width=100, height=100)
d.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. 
dpi --> change dpi of the pdf to show

Dependencies

  • tkinter
  • PyMuPDF
  • Thread
  • math
  • customtkinter

License

MIT

Author

Project details


Release history Release notifications | RSS feed

This version

0.2

Download files

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

Source Distribution

tkinterPdfViewer-0.2.tar.gz (5.1 kB view hashes)

Uploaded Source

Built Distribution

tkinterPdfViewer-0.2-py3-none-any.whl (5.5 kB view hashes)

Uploaded Python 3

Supported by

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