Coder Social home page Coder Social logo

jain18ayush / tkpdfviewer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from roshanpaswan/tkpdfviewer

0.0 0.0 0.0 14 KB

The tkPDFViewer is python library developed by Roshan Paswan, which allows you to embed the PDF file in your tkinter GUI.

License: MIT License

Python 100.00%

tkpdfviewer's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.