Currently, PyMuPDFDocument can only be initialized by providing a file path as a str. Similar libraries, such as pdfplumber, accept multiple data types, like pathlib.Path, BufferedReader or BytesIO. Adding this feature would allow the use of PDF documents directly downloaded as bytes objects, such as those from the web.
Currently,
PyMuPDFDocument
can only be initialized by providing a file path as a str. Similar libraries, such as pdfplumber, accept multiple data types, likepathlib.Path
,BufferedReader
orBytesIO
. Adding this feature would allow the use of PDF documents directly downloaded as bytes objects, such as those from the web.