PDFium Delphi Component Docs

IsAnnotationSubtypeSupported method

Component: TPdf  ·  Unit: PDFium
Ask whether the loaded PDFium module can create a given annotation subtype

Syntax

function IsAnnotationSubtypeSupported(Subtype: TPdfAnnotationSubtype): Boolean;

SubtypeTPdfAnnotationSubtype. Subtype to test: anUnknown, anText, anLink, anFreeText, anLine, anSquare, anCircle, anPolygon, anPolyLine, anHighlight, anUnderline, anSquiggly, anStrikeout, anStamp, anCaret, anInk, anPopup, anFileAttachment, anSound, anMovie, anWidget, anScreen, anPrinterMark, anTrapNet, anWaterMark, anThreed, anRichMedia, anXfaWidget, anRedact
ResultBoolean. True when the module supports creating that subtype

Description

PDFium creates only a subset of the annotation subtypes the PDF specification defines, and the subset differs between builds. Testing first lets an application disable a markup tool in advance instead of letting CreateAnnotation fail later

The answer describes creation support. Existing annotations of an unsupported subtype are still read and rendered

On a build that does not export the capability query the result is False, which keeps a caller on the conservative side

See Also

CreateAnnotation, Annotation, AnnotationCount, DeleteAnnotation