Python 3 tkdocviewer Library Tkinter GUI Script to Load and Display PDF Viewer Document Full Project For Beginners

Python 3 tkdocviewer Library Tkinter GUI Script to Load and Display PDF Viewer Document Full Project For Beginners

 

Welcome folks today in this blog post we will be loading pdf documents in tkinter using tkdocviewer library. All the full source code of the application is shown below

 

 

 

Get Started

 

 

 

In order to get started you need to install the following library using the pip command as shown below

 

pip install tkinter

 

pip install tkdocviewer

 

After installing all the libraries just make an app.py file and copy paste the following code

 

app.py

 

 

from tkinter import *
from tkdocviewer import *

# Create a root window
root = Tk()

# Create a DocViewer widget
v = DocViewer(root)
v.pack(side="top", expand=1, fill="both")

# Display some document
v.display_file("sample.pdf")

# Start Tk's event loop
root.mainloop()

 

 

Now just run the python script app.py by typing the below command

See also  Join 50+ Python Data Science Whatsapp Group Invite Links For Machine Learning Programmer and Developers | Whatsapp Group Invite Links For Artificall Intelligence

 

python app.py

 

 

 

Leave a Reply