Replies: 1 comment 6 replies
-
You mean a feature for these 7-10 lines? mat = fitz.Matrix(zoom, zoom) # zoom = parameter
source = fitz.open(...)
target = fitz.open()
for page in source:
pix = page.get_pixmap(matrix=mat)
tarpage = target.new_page(width=pix.width, height=pix.height)
tarpage.insert_image(tarpage.rect, stream=pix.pil_tobytes("JPEG"))
target.ez_save(targetname) # targetname = parameter How about you write a |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm starting from the idea you can « censor » part of the document by adding an overlay, but like wiki said, it's just an overlay, text is still present on the document.
I'm looking for a way where you can't get original content. One easy idea is to simply rasterize content, so original text won't be physically present at all. This is clearly not optimal for document size, but it works :p
There is already a
page.get_pixmap()
which does that actually. The feature request here would be a simple way to convert a whole document to a rasterized version of that document.In the meantime, I'm testing some snippet to do it manually. :)
Beta Was this translation helpful? Give feedback.
All reactions