Skip to content

How to use fitz to delete tables in PDF? Need help, Thanks. #115

Answered by JorjMcKie
xiaobie-lhm asked this question in Q&A
Discussion options

You must be logged in to vote

Determine the bbox that wraps the table. Then use a redactions annotation to remove the table's text:

page.add_redact_annot(bbox)
page.apply_redactions()

Don't forget to save with an appropriate garbage collection to get rid of the "ghost" objects created by the process.

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
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #114 on September 23, 2023 12:19.