Closed jrom99 closed 3 years ago
I want to get the first page in a single statement, as in:
>>>import fitz >>>from pathlib import Path >>> >>>infile = Path("./some_document.pdf") >>>page = fitz.Document(infile).load_page(0) # raises ValueError: orphaned object: parent is None
My configuration: python version: 3.9.5, mypupdf installed with pip
fitz.__doc__ PyMuPDF 1.18.16: Python bindings for the MuPDF 1.18.0 library. Version date: 2021-08-05 00:00:01. Built for Python 3.9 on linux (64-bit).
fitz.__doc__
This is intended: a feature , not a bug. Please read the chapter "Ensuring Consistency of Important Objects in PyMuPDF" of the documentation.
I want to get the first page in a single statement, as in:
My configuration: python version: 3.9.5, mypupdf installed with pip
fitz.__doc__
PyMuPDF 1.18.16: Python bindings for the MuPDF 1.18.0 library. Version date: 2021-08-05 00:00:01. Built for Python 3.9 on linux (64-bit).