Python 3 Script to Add Image and Text Annotations to PDF Documents Using pdf-annotate Module Full Project For Beginnners



A pure-python library to add annotations to PDFs.

Build Status




pdf-annotate is a simple library to add PDF annotations to PDFs. Under the hood it uses the powerful and unopinionated pdfrw library to parse the PDF to figure out where to place the annotations.





from pdf_annotate import PdfAnnotator, Location, Appearance
a = PdfAnnotator('a.pdf')
    Location(x1=50, y1=50, x2=100, y2=100, page=0),
    Appearance(stroke_color=(1, 0, 0), stroke_width=5),
a.write('b.pdf')  # or use overwrite=True if you feel lucky

Annotation Types



pdf-annotate includes most of the basic PDF annotation types, leaving out some of the more complex interactive types. Contributions for these welcome! Currently supported annotation types are:

  • square
  • circle
  • line
  • polygon
  • polyline
  • ink
  • text
  • image

Leave a Reply