Closed pprados closed 2 weeks ago
@JorjMcKie can you revue this PR ?
This is unnecessary because you always can use a Document
object instead of a filename string.
If we were to start changes like these we would replicate code that is already present in the parent package PyMuPDF.
I have once already rejected a change that requested support of pathlib.Path
specifications instead a string-based filename.
To support decryption simply do this:
doc = pymupdf.open("encrypted.pdf")
doc.authenticate(password)
md = pymupdf4llm.to_markdown(doc, ...)
ok
Add the password to load the PDF file.