Cannot show optional content group: AttributeError: module 'fitz.mupdf' has no attribute 'pdf_array_push_drop' #3195
-
Description of the bugI tried to set the visibility of an optional content group with
and got
=> How to correctly show/hide optional content groups? How to reproduce the bugFull example:
Example images first.png, second.png, third.png PyMuPDF version1.23.23 Operating systemWindows Python version3.11 |
Beta Was this translation helpful? Give feedback.
Replies: 9 comments 4 replies
-
Thanks for reporting this. I have a fix in my tree. |
Beta Was this translation helpful? Give feedback.
-
Thank you. I think this does not make the ocm visible, yet. I would expect something like
or
But there are no such methods. => How to programmatically show a previously hidden ocg (or layer)? |
Beta Was this translation helpful? Give feedback.
-
@stefaneidelloth Please have a look at layer_ui_configs() and set_layer_ui_config(number, action=0). Close by in that part of the documentation, you will also find ways to make permanent changes. |
Beta Was this translation helpful? Give feedback.
-
Thanks. As you see in the comments /end of the example, I already tried that. What would be a modified version of the example that works? (I also attached example image files just now.) |
Beta Was this translation helpful? Give feedback.
-
The |
Beta Was this translation helpful? Give feedback.
-
[I've converted this into a discussion, as that seems more appropriate.] |
Beta Was this translation helpful? Give feedback.
-
Is there some working example that shows how to show optional content groups? In the doc for
Should that be |
Beta Was this translation helpful? Give feedback.
-
Are the optional content groups expected to work with mypdf viewer only or also with Acrobat Reader? |
Beta Was this translation helpful? Give feedback.
-
Got it working with version 1.23.26. (Don't know what the exact issue has been.)
|
Beta Was this translation helpful? Give feedback.
Got it working with version 1.23.26. (Don't know what the exact issue has been.)