![]() Here you must be thinking why I have used two for loops one adding images to list and the second one for adding images to the text widget, I had actually used one loop but then it was only showing the last page in the PDF, this might be happening, because I was using a single variable to hold the image and store into text widget. # Adding all the images to the text widget # Here the PDF is converted to list of images # Setting the scrollbar to the right side Pdf = Text(pdf_frame,yscrollcommand=scrol_y.set,bg="grey") ![]() # Adding text widget for inserting images Scrol_y = Scrollbar(pdf_frame,orient=VERTICAL) Pdf_frame = Frame(root).pack(fill=BOTH,expand=1) Source Code: Create a PDF viewer GUI in Python # Importing required modules Installation: $ sudo apt-get install python3-tkĪfter installing the above modules and required dependencies you can get into actual code.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |