PDFium Delphi Component Docs

IsAnnotationObjectSubtypeSupported 메서드

컴포넌트: TPdf  ·  유닛: PDFium
로드된 PDFium 모듈이 주어진 주석 서브타입을 주석 객체로 처리할 수 있는지 묻습니다

구문

function IsAnnotationObjectSubtypeSupported(Subtype: TPdfAnnotationSubtype): Boolean;

SubtypeTPdfAnnotationSubtype. 테스트할 서브타입: 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입니다

설명

IsAnnotationSubtypeSupported의 객체 수준 짝입니다. 그 호출이 CreateAnnotation으로 서브타입을 만들 수 있는지 보고한다면, 이쪽은 모듈이 그 서브타입의 객체 처리를 지원하는지 묻습니다. 이는 AnnotationObjectInfo와 AnnotationObjectCount처럼 주석 안에 그려진 페이지 객체를 읽고 편집하는 주석 객체 API를 가르는 질의입니다

답은 PDFium 빌드마다 다릅니다. 미리 테스트해 두면 객체 수준 편집 기능을 애초에 켜거나 끌 수 있고, 실제 호출이 나중에 실패하는 일을 피할 수 있습니다

로드된 PDFium 빌드가 네이티브 질의(FPDFAnnot_IsObjectSupportedSubtype)를 내보내지 않으면 결과는 False라서 호출자가 보수적으로 행동하게 됩니다

예제

if Pdf1.IsAnnotationObjectSubtypeSupported(anStamp) then
  BtnEditStampObjects.Enabled := True
else
  // no object-level stamp editing on this PDFium build
  BtnEditStampObjects.Enabled := False;

관련 항목

IsAnnotationSubtypeSupported, AnnotationObjectInfo, AnnotationObjectCount, CreateAnnotation