Skip to content

Instantly share code, notes, and snippets.

View AMasetti's full-sized avatar
:dependabot:
Building the future

Augusto Masetti AMasetti

:dependabot:
Building the future
  • Nimble.LA
  • Rosario, Argentina
  • 08:39 (UTC -03:00)
View GitHub Profile
@AMasetti
AMasetti / pdf_utils.py
Last active June 11, 2024 18:38
PDF Utils
import fitz # PyMuPDF
import re
def remove_text_containing_string(pdf_path, output_path, target_string):
# Open the original PDF
document = fitz.open(pdf_path)
# Iterate through each page
for page_num in range(document.page_count):
page = document.load_page(page_num)