Skip to content

Instantly share code, notes, and snippets.

tonytx05 /
Created October 2, 2023 17:39
Script to remove author names from all annotations in a PDF.
from pypdf import PdfReader, PdfWriter
reader = PdfReader('input.pdf')
writer = PdfWriter()
for page in reader.pages:
if '/Annots' in page:
for annot in page['/Annots']:
obj = annot.get_object()
if '/T' in obj: