We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 104051b commit a0e5b06Copy full SHA for a0e5b06
tests/resources/test-4479.pdf
156 KB
tests/test_4479.py
@@ -0,0 +1,21 @@
1
+import pymupdf
2
+
3
4
+def test_4479():
5
+ if pymupdf.mupdf_version_tuple < (1, 26, 0):
6
+ print("Skipping test_4479: requires MuPDF 1.26.0 or later")
7
+ return
8
+ path = os.path.abspath(f"{__file__}/../../tests/resources/test-4479.pdf")
9
+ doc = pymupdf.open(path)
10
11
+ for layer in doc.layer_ui_configs():
12
+ if layer["text"] == "layer_2":
13
+ assert not layer["on"]
14
+ else:
15
+ assert layer["on"]
16
+ doc.set_layer_ui_config("layer_7", action=pymupdf.PDF_OC_TOGGLE)
17
18
+ if layer["text"] in ("layer_2", "layer_7"):
19
20
21
0 commit comments