Roshanpaswan / tkPDFViewer

The tkPDFViewer is python library developed by Roshan Paswan, which allows you to embed the PDF file in your tkinter GUI.
MIT License
14 stars 9 forks source link

anyone else having this issue with fitz in tkPDFViewer? #12

Open Lightwave234 opened 3 months ago

Lightwave234 commented 3 months ago

so I'm trying to use tkPDFViewer for a project, but when using it, it sometimes throws errors saying that the '/static' file is missing, 'Progressbar' is undefined, but when deleting fitz, the 'Progressbar' issue is fixed, but the methods associated with fitz still remain. I would appreciate it if someone can either help me with this problem by either fixing fitz, or providing an alternative that is compatible with tkPDFViewer.

Lightwave234 commented 3 months ago

Actually, I managed to fix the issue, I managed to find an alternative library called pymupdf which provides similar functions to that of fitz, so by replacing all the items in the script that say 'fitz' with 'pymupdf' and changing 'getPixmap()' to 'get_pixmap()', the program then works as intended.

MikeChen012345 commented 3 months ago

I faced the same issue and came here to find the answer. In issue #10 jjacobson95 has also made a new version of the library to fix the issue and it worked for me.