Skip to content

Instantly share code, notes, and snippets.

@mjbryant
Created July 2, 2019 19:25
Show Gist options
  • Save mjbryant/75bf3b60496d12f739a6d4aa6c3ac36d to your computer and use it in GitHub Desktop.
Save mjbryant/75bf3b60496d12f739a6d4aa6c3ac36d to your computer and use it in GitHub Desktop.
from pdf_annotate import PdfAnnotator, Appearance, Location
annotator = PdfAnnotator('test.pdf')
annotator.add_annotation(
'square',
Location=Location(x1=10, y1=20, x2=100, y2=100, page=0),
Appearance=Appearance(fill=(1, 0, 0))
)
annotator.write('annotated.pdf')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment