-
Notifications
You must be signed in to change notification settings - Fork 510
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot show optional content group: AttributeError: module 'fitz.mupdf' has no attribute 'pdf_array_push_drop' #3180
Comments
We need to use mupdf.pdf_array_push(), not mupdf.pdf_array_push_drop(). Addresses pymupdf#3180.
Thanks for reporting this. I have a fix in my tree. |
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)? |
@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. |
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.) |
We need to use mupdf.pdf_array_push(), not mupdf.pdf_array_push_drop(). Addresses #3180.
We need to use mupdf.pdf_array_push(), not mupdf.pdf_array_push_drop(). Addresses #3180.
The |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Description of the bug
I tried to set the visibility of an optional content group with
doc.set_layer(config=-1, on=[first_id])
and got
AttributeError: module 'fitz.mupdf' has no attribute 'pdf_array_push_drop'
=> How to correctly show/hide optional content groups?
How to reproduce the bug
Full example:
Example images first.png, second.png, third.png
PyMuPDF version
1.23.23
Operating system
Windows
Python version
3.11
The text was updated successfully, but these errors were encountered: