Skip to content

Open multiple files #4

@j4321

Description

@j4321

When I try to open multiple files in different ShowPdf instances, I get a concatenation of both documents in both frames. I would expect instead to get each document in a separate frame.

Code to reproduce the issue:

from tkPDFViewer import tkPDFViewer as pdf
from tkinter import Tk

root = Tk()

file1 = "/path/to/first/pdf"
file2 = "/path/to/second/pdf"

viewer1 = pdf.ShowPdf()
pdf_frame1 = viewer1.pdf_view(root, pdf_location=file1, width=150,height=50)
pdf_frame1.pack(side="left")
viewer2 = pdf.ShowPdf()
pdf_frame2 = viewer2.pdf_view(root, pdf_location=file2, width=150,height=50)
pdf_frame2.pack(side="left")
root.mainloop()

I know what is causing the issue (the img_object_li class attribute) and I will work on a fix on my fork of this project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions