Skip to content

OCG / Deleting invisible OCGs #3567

Discussion options

You must be logged in to vote

I think you detected a bug in MuPDF!
The PDF indeed has no defined OCProperties. The existing OCGs which are referenced by the page actually must be ignored! But are not.
So I removed / disabled the OCGs and created the SVG again - and now the SVG image is equivalent to the Pixmap!
Here is the code sippet that did that. It simply takes each OCG and replaces its (anyway irrelevant) content by an empty dictionary:

for _,xref,_ in page.get_oc_items():
    doc.update_object(xref, "<<>>")

That's all.

If you agree, I will turn this into a bug and forward the file to MuPDF's bug system.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@serhii-brovarnyk
Comment options

Comment options

You must be logged in to vote
2 replies
@serhii-brovarnyk
Comment options

@JorjMcKie
Comment options

Answer selected by serhii-brovarnyk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants