5

I am facing this task of adding comments to PDFs. Specifically, the task is to add a sticky note box at the beginning of the file and add a few lines of text in the stick note box.

I need to do this repetitively for bulk number of PDFs so I am hoping to do it programmatically in Python.

I've checked this SOF thread but it seems that it's asking a different question since it's adding text INTO the PDFs not in the comment.

Martin Thoma
  • 124,992
  • 159
  • 614
  • 958
Allen Lin
  • 1,179
  • 4
  • 13
  • 23
  • You can add annotations to PDF documents with PyPDF2. The PDF format has several different kinds of annotations, one is an attachment ([pypdf docs](https://pypdf2.readthedocs.io/en/latest/user/adding-pdf-annotations.html)). I currently look at other topics, but please ping me again if I haven't added an answer in June 2022. – Martin Thoma May 14 '22 at 11:49

1 Answers1

0

You can add annotations to PDF documents with PyPDF2. The PDF format has several different kinds of annotations:

https://pypdf2.readthedocs.io/en/latest/user/adding-pdf-annotations.html

The AnnotationBuilder currently only supports free text annotations, but other annotation types will be supported soon

Martin Thoma
  • 124,992
  • 159
  • 614
  • 958