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

Function test_trailer

tests/test_object_manipulation.py:30–38  ·  view source on GitHub ↗

Access PDF trailer information.

()

Source from the content-addressed store, hash-verified

28
29
30def test_trailer():
31 """Access PDF trailer information."""
32 doc = pymupdf.open(filename)
33 xreflen = doc.xref_length()
34 _, xreflen_str = doc.xref_get_key(-1, "Size")
35 assert xreflen == int(xreflen_str)
36 trailer_keys = doc.xref_get_keys(-1)
37 assert "ID" in trailer_keys
38 assert "Root" in trailer_keys
39
40
41def test_valid_name():

Callers

nothing calls this directly

Calls 3

xref_lengthMethod · 0.80
xref_get_keyMethod · 0.80
xref_get_keysMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…