I am having an issue with the tkPDFViewer library.
I want my code to basically create a slideshow of pdf's using tkinter. Right now my code adds each pdf to what's already there instead of removing the previous pdf. Please help me.
from tkPDFViewer import tkPDFViewer as pdf
destroy_list = []
def run():
for thing in destroy_list:
thing.pack_forget()
try:
v1.img_object_li.clear()
except:
pass
item = Scans_List[0]
v2 = None
v1 = None
openfile = f"Scans\{item}"
title_label.config(text = openfile)
v1 = pdf.ShowPdf()
v2 = v1.pdf_view(root, pdf_location = openfile, bar = False, width = 66, height = 90)
v2.pack(side = "top", anchor = "e")
destroy_list.append(v2)
Scans_List.remove(item)
root.after(5000, run)
run()