This is a very straightforward issue. I added an invisible text layer using page.insert_text()
.
After saving the modified pdf, I can use page.get_text()
to retrieve the created text layer.
I would like to be able to eliminate that layer, buy couldn't find a function to do it.
The solution I've came up with is taking the pages as images and create a new pdf. But it seems like a very inefficient solution.
I would like to be able to solve this issue without using a different library other than fitz and it feels like it should be a solution within fitz, considering that page.get_text()
can access the exact information I'm trying to eliminate