Skip to content

I want a function for delete image from Document.Page #874

Discussion options

You must be logged in to vote

There already exists a GUI script that lets you delete images: look at the repo home page.

But this is actually not what you want apparently: you want to remove watermarks!
A watermark can be multiple different things: an image, normal text (like it seems in your case), or a special annotation.

I don't intend to make a general function that covers all these different cases.
But you have enough options to do that yourself with PyMuPDF right now:

  1. You can use the mentioned GUI script to remove an image from a page. That script also allows insertion of new images, or to change the position / rotation of an existing image.
  2. You can remove annotations from a page via method page.deleteAnnot(annot)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by JorjMcKie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #871 on February 02, 2021 23:00.