Skip to content

Question: Delete leftover XMP metadata when replacing images #474

Answered by jbarlow83
mnmtz asked this question in Q&A
Discussion options

You must be logged in to vote

remove_unreferenced_resources removes objects that are not referenced in the corresponding content stream. (Not your case.)

You need to delete the key from the parent dictionary - deleting the object just deletes that reference.

It may be the object is referenced from elsewhere in the PDF, so it cannot be removed.

If you inspect the JSON serialization of the PDF you may be able to find what object references the one you are trying to delete.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@mnmtz
Comment options

@jbarlow83
Comment options

@mnmtz
Comment options

@jbarlow83
Comment options

Answer selected by mnmtz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants