Remove Form XObject from PDF #2116
Replies: 2 comments 2 replies
-
You are lucky that the problem got solved in this way. As it worked, your PDF should be okay. |
Beta Was this translation helpful? Give feedback.
-
Hi, is there any update on this? Specifically, I am trying to delete XObjects created using |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
First I would like to thank you for such a great project, learning something new every day as I use it more!
I would like to remove some Form XObject from the PDF file and not sure how to do that. I can get the xref by calling page.get_xobjects() and inspect the object info with doc.xref_object method. How do I remove it from the PDF file?
This is what I tried so far

doc.xref_set_key(page.xref, "Resources/XObject", "null")
And it got me exactly what I wanted, but I got an warning when opening the PDF in Adobe.
I can use
page.clean_contents()
before saving and it seems to get rid of that warning.Just not sure if that is the right way to handle.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions