Skip to content

fix: new import for pymupdf#1

Open
lcb931023 wants to merge 1 commit intojoachimesque:mainfrom
lcb931023:main
Open

fix: new import for pymupdf#1
lcb931023 wants to merge 1 commit intojoachimesque:mainfrom
lcb931023:main

Conversation

@lcb931023
Copy link
Copy Markdown

From pymupdf doc:

Note on the Name fitz
Old versions of PyMuPDF had their Python import name as fitz. Newer versions use pymupdf instead, and offer fitz as a fallback so that old code will still work.

The reason for the name fitz is a historical curiosity:

The original rendering library for MuPDF was called Libart.

“After Artifex Software acquired the MuPDF project, the development focus shifted on writing a new modern graphics library called “Fitz”. Fitz was originally intended as an R&D project to replace the aging Ghostscript graphics library, but has instead become the rendering engine powering MuPDF.” (Quoted from Wikipedia).

Note

Importing PyMuPDF as fitz still works however PyMuPDF cannot coexist with other packages named “fitz” in the same Python environment.

However in practice on my mac, importing fitz causes an error, which this change fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant