MCPcopy Index your code
hub / github.com/pymupdf/PyMuPDF / close

Method close

src/__init__.py:4275–4291  ·  view source on GitHub ↗

Close document.

(self)

Source from the content-addressed store, hash-verified

4273 return pages
4274
4275 def close(self):
4276 """Close document."""
4277 if getattr(self, "is_closed", True):
4278 raise ValueError("document closed")
4279 # self._cleanup()
4280 if hasattr(self, "_outline") and self._outline:
4281 self._outline = None
4282 self._reset_page_refs()
4283 #self.metadata = None
4284 #self.stream = None
4285 self.is_closed = True
4286 #self.FontInfos = []
4287 self.Graftmaps = {} # Fixes test_3140().
4288 #self.ShownPages = {}
4289 #self.InsertedImages = {}
4290 #self.this = None
4291 self.this = None
4292
4293 def convert_to_pdf(self, from_page=0, to_page=-1, rotate=0):
4294 """Convert document to a PDF, selecting page range and optional rotation. Output bytes object."""

Callers 15

full_ocrFunction · 0.95
get_textpage_ocrFunction · 0.95
__exit__Method · 0.95
full_ocrFunction · 0.95
get_textpage_ocrFunction · 0.95
analysisFunction · 0.95
test_bug1971Function · 0.95
showFunction · 0.45
cleanFunction · 0.45
doc_joinFunction · 0.45
embedded_copyFunction · 0.45
embedded_delFunction · 0.45

Calls 1

_reset_page_refsMethod · 0.95

Tested by 15

analysisFunction · 0.76
test_bug1971Function · 0.76
test_2391Function · 0.36
test_4004Function · 0.36
test_2812Function · 0.36
test_2348Function · 0.36
test_3180Function · 0.36
test_4141Function · 0.36
test_labels_styleAFunction · 0.36
wrapFunction · 0.36
test_3081Function · 0.36
next_fdFunction · 0.36