38
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 20 Jun 2025
38 points (95.2% liked)
Open Source
38137 readers
217 users here now
All about open source! Feel free to ask questions, and share news, and interesting stuff!
Useful Links
- Open Source Initiative
- Free Software Foundation
- Electronic Frontier Foundation
- Software Freedom Conservancy
- It's FOSS
- Android FOSS Apps Megathread
Rules
- Posts must be relevant to the open source ideology
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
- !libre_culture@lemmy.ml
- !libre_software@lemmy.ml
- !libre_hardware@lemmy.ml
- !linux@lemmy.ml
- !technology@lemmy.ml
Community icon from opensource.org, but we are not affiliated with them.
founded 5 years ago
MODERATORS
Found this on stackoverflow: https://stackoverflow.com/questions/68903835/how-to-draw-a-shape-inside-a-pdf-with-python
import fitz
Open the pdf
doc = fitz.open('./test.pdf') for page in doc: # For every page, draw a rectangle on coordinates (1,1)(100,100) page.draw_rect([1,1,100,100], color = (0, 1, 0), width = 2)
Save pdf
doc.save('./your-route/name.pdf')
Seems like it has a solid chance of working.
does it simply place an image of that size on top of every page at the desired position or does it redact the element underneath it as well?