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

Function clear_xref

tests/test_2634.py:20–29  ·  view source on GitHub ↗

Clear toc items that naturally differ.

(toc)

Source from the content-addressed store, hash-verified

18 toc_new = new.get_toc(simple=False)
19
20 def clear_xref(toc):
21 '''
22 Clear toc items that naturally differ.
23 '''
24 for item in toc:
25 d = item[3]
26 if 'collapse' in d:
27 d['collapse'] = 'dummy'
28 if 'xref' in d:
29 d['xref'] = 'dummy'
30
31 clear_xref(toc_pdf)
32 clear_xref(toc_new)

Callers 1

test_2634Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…