Skip to content

Commit 13d89c0

Browse files
src/__init__.py: fix call of pdf_is_ocg_hidden() with mupdf master.
1 parent d9d4ab8 commit 13d89c0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4935,7 +4935,11 @@ def get_ocgs(self):
49354935
o = mupdf.pdf_array_get( intent, j)
49364936
if mupdf.pdf_is_name( o):
49374937
intents.append( mupdf.pdf_to_name( o))
4938-
hidden = mupdf.pdf_is_ocg_hidden( pdf, mupdf.PdfObj(), usage, ocg)
4938+
if mupdf_version_tuple >= (1, 27):
4939+
resource_stack = mupdf.PdfResourceStack()
4940+
hidden = mupdf.pdf_is_ocg_hidden( pdf, resource_stack, usage, ocg)
4941+
else:
4942+
hidden = mupdf.pdf_is_ocg_hidden( pdf, mupdf.PdfObj(), usage, ocg)
49394943
item = {
49404944
"name": name,
49414945
"intent": intents,

0 commit comments

Comments
 (0)