MCPcopy Create free account
hub / github.com/pymupdf/PyMuPDF / get_new_xref

Method get_new_xref

src/__init__.py:4890–4898  ·  view source on GitHub ↗

Make new xref.

(self)

Source from the content-addressed store, hash-verified

4888 return rc
4889
4890 def get_new_xref(self):
4891 """Make new xref."""
4892 if self.is_closed or self.is_encrypted:
4893 raise ValueError("document closed or encrypted")
4894 pdf = _as_pdf_document(self)
4895 xref = 0
4896 ENSURE_OPERATION(pdf)
4897 xref = mupdf.pdf_create_object(pdf)
4898 return xref
4899
4900 def get_oc(doc: 'Document', xref: int) -> int:
4901 """Return optional content object xref for an image or form xobject.

Callers 7

set_metadataMethod · 0.80
set_ocmdMethod · 0.80
set_tocMethod · 0.80
set_metadataFunction · 0.80
set_tocFunction · 0.80
set_ocmdFunction · 0.80
test_2556Function · 0.80

Calls 2

_as_pdf_documentFunction · 0.85
ENSURE_OPERATIONFunction · 0.85

Tested by 1

test_2556Function · 0.64