diff --git a/android/src/main/java/com/pspdfkit/react/helper/ConversionHelpers.java b/android/src/main/java/com/pspdfkit/react/helper/ConversionHelpers.java index 3a4db8d4..d78dadc3 100644 --- a/android/src/main/java/com/pspdfkit/react/helper/ConversionHelpers.java +++ b/android/src/main/java/com/pspdfkit/react/helper/ConversionHelpers.java @@ -64,6 +64,9 @@ public static EnumSet getAnnotationTypeFromString(@Nullable fina if ("pspdfkit/text".equalsIgnoreCase(type)) { return EnumSet.of(AnnotationType.FREETEXT); } + if ("pspdfkit/stamp".equalsIgnoreCase(type)) { + return EnumSet.of(AnnotationType.STAMP); + } return EnumSet.noneOf(AnnotationType.class); } } diff --git a/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFAnnotation.m b/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFAnnotation.m index 7139b209..2ef12288 100644 --- a/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFAnnotation.m +++ b/ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFAnnotation.m @@ -54,10 +54,14 @@ + (PSPDFAnnotationType)annotationTypeFromInstantJSONType:(NSString *)type { return PSPDFAnnotationTypeLine; } else if ([type isEqualToString:@"pspdfkit/shape/polygon"]) { return PSPDFAnnotationTypePolygon; + } else if ([type isEqualToString:@"pspdfkit/shape/polyline"]) { + return PSPDFAnnotationTypePolyLine; } else if ([type isEqualToString:@"pspdfkit/shape/rectangle"]) { return PSPDFAnnotationTypeSquare; } else if ([type isEqualToString:@"pspdfkit/text"]) { return PSPDFAnnotationTypeFreeText; + } else if ([type isEqualToString:@"pspdfkit/stamp"]) { + return PSPDFAnnotationTypeStamp; } else { return PSPDFAnnotationTypeUndefined; }