minus-squarej5906@feddit.orgtoOpen Source@lemmy.ml•How to delete a certain element present on all pages of a pdf?linkfedilinkarrow-up2·1 month agoFound 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. linkfedilink
minus-squarej5906@feddit.orgtocats@lemmy.world•I'm gonna miss her so muchlinkfedilinkarrow-up11·2 months ago linkfedilink
minus-squarej5906@feddit.orgtoFunny@sh.itjust.works•I bet it's an engineering marvel though.linkfedilinkarrow-up39arrow-down3·3 months ago You can see it from space linkfedilink
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.