This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |