Skip to content
Discussion options

You must be logged in to vote

I have a pdf from external source. Sometimes it has background color, sometimes it does not. I want it to be without the background color. I am trying to do this manually for ages, today I found pymupdf and I am wondering if such a thing is possible with it. I am not sure how it should be done with pymu, but manually I was trying to find the object that represented the background, delete the object and update xref table. Are such things possible with pymu?

Yes, this is possible.
As always with PDF, there are amazingly many ways to achieve the type of thing you describe (incomplete list):

  • Image used covering the page. Solution: find the image xref and replace with a small, empty, transp…

Replies: 4 comments 21 replies

Comment options

You must be logged in to vote
8 replies
@JorjMcKie
Comment options

@JorjMcKie
Comment options

@nissansz
Comment options

@JorjMcKie
Comment options

@nuthinking
Comment options

Answer selected by usmansc
Comment options

You must be logged in to vote
10 replies
@JorjMcKie
Comment options

@nuthinking
Comment options

@JorjMcKie
Comment options

@nuthinking
Comment options

@nuthinking
Comment options

Comment options

You must be logged in to vote
2 replies
@nuthinking
Comment options

@JorjMcKie
Comment options

Comment options

You must be logged in to vote
1 reply
@nuthinking
Comment options

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