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

Method set_id

src/__init__.py:2534–2541  ·  view source on GitHub ↗

Set a unique id.

(self, unique)

Source from the content-addressed store, hash-verified

2532 return self
2533
2534 def set_id(self, unique):
2535 """Set a unique id."""
2536 # check uniqueness
2537 root = self.root
2538 if root.find(None, "id", unique):
2539 raise ValueError(f"id '{unique}' already exists")
2540 self.set_attribute("id", unique)
2541 return self
2542
2543 def set_italic(self, val=True):
2544 """Set italic on / off via CSS style"""

Callers 2

set_propertiesMethod · 0.95
code_printerFunction · 0.80

Calls 2

set_attributeMethod · 0.95
findMethod · 0.80

Tested by

no test coverage detected