Skip to content

Commit d0d8bc5

Browse files
authored
DOC: Update annotation list (#2534)
Copied in order from Table 171 annotation types of the PDF 2.0 Specification. The three added annotations are Redact (PDF 1.7), Projection (PDF 2.0) and RichMedia (PDF 2.0).
1 parent 033e763 commit d0d8bc5

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

docs/user/reading-pdf-annotations.md

+22-7
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,42 @@
11
# Reading PDF Annotations
22

3-
PDF 1.7 defines 25 different annotation types:
3+
PDF 2.0 defines the following annotation types:
44

55
* Text
66
* Link
77
* FreeText
8-
* Line, Square, Circle, Polygon, PolyLine, Highlight, Underline, Squiggly, StrikeOut
9-
* Stamp, Caret, Ink
8+
* Line
9+
* Square
10+
* Circle
11+
* Polygon
12+
* PolyLine
13+
* Highlight
14+
* Underline
15+
* Squiggly
16+
* StrikeOut
17+
* Caret
18+
* Stamp
19+
* Ink
1020
* Popup
1121
* FileAttachment
12-
* Sound, Movie
13-
* Widget, Screen
22+
* Sound
23+
* Movie
24+
* Screen
25+
* Widget
1426
* PrinterMark
1527
* TrapNet
1628
* Watermark
1729
* 3D
30+
* Redact
31+
* Projection
32+
* RichMedia
1833

1934
In general, annotations can be read like this:
2035

2136
```python
2237
from pypdf import PdfReader
2338

24-
reader = PdfReader("commented.pdf")
39+
reader = PdfReader("annotated.pdf")
2540

2641
for page in reader.pages:
2742
if "/Annots" in page:
@@ -53,7 +68,7 @@ for page in reader.pages:
5368
```python
5469
from pypdf import PdfReader
5570

56-
reader = PdfReader("commented.pdf")
71+
reader = PdfReader("example.pdf")
5772

5873
for page in reader.pages:
5974
if "/Annots" in page:

0 commit comments

Comments
 (0)