Is it possible to create Line and Watermark annotation into pdf?

28 views
Skip to first unread message

Loc Zhang (上杉夏香)

unread,
Sep 26, 2025, 3:55:47 AMSep 26
to pdfium
When I call FPDFPage_CreateAnnot to create line and watermark annotation, I get an error.

And I see FPDFAnnot_IsSupportedSubtype 
```c
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
FPDFAnnot_IsSupportedSubtype(FPDF_ANNOTATION_SUBTYPE subtype) {
// The supported subtypes must also be communicated in the user doc.
switch (subtype) {
case FPDF_ANNOT_CIRCLE:
case FPDF_ANNOT_FILEATTACHMENT:
case FPDF_ANNOT_FREETEXT:
case FPDF_ANNOT_HIGHLIGHT:
case FPDF_ANNOT_INK:
case FPDF_ANNOT_LINK:
case FPDF_ANNOT_POPUP:
case FPDF_ANNOT_SQUARE:
case FPDF_ANNOT_SQUIGGLY:
case FPDF_ANNOT_STAMP:
case FPDF_ANNOT_STRIKEOUT:
case FPDF_ANNOT_TEXT:
case FPDF_ANNOT_UNDERLINE:
return true;
default:
return false;
}
}
```

There is no way use pdfium to create annotation like line?
Reply all
Reply to author
Forward
0 new messages