Class AnnotationProvider
Handles all annotation related operations on the owning document. Retrieve it with GetAnnotationProvider()
Inheritance
Namespace: PSPDFKit.Annotations
Assembly: PSPDFKit.dll
Syntax
public class AnnotationProvider : object
Methods
AddAnnotationJson(JToken)
Add an annotation to the document. For information on Annotation json format see https://pspdfkit.com/guides/server/current/server-api/json-format/
Declaration
public void AddAnnotationJson(JToken jsonAnnotation)
Parameters
Type | Name | Description |
---|---|---|
JToken | jsonAnnotation | The annotation to add. |
GetAnnotationsJson(UInt32)
Get all the annotations on the given page. The format of the annotation Json can be found at https://pspdfkit.com/guides/server/current/server-api/json-format/
Declaration
public JArray GetAnnotationsJson(uint pageIndex)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | pageIndex | The page index to get annotations for. Index is zero-based, therefore the first page is at index 0. |
Returns
Type | Description |
---|---|
JArray | A Json array of annotations. |
RemoveAnnotation(UInt32, UInt64)
Remove an annotation with the given PDF object ID.
Declaration
public void RemoveAnnotation(uint pageIndex, ulong pdfObjectId)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | pageIndex | The page index where the annotation is shown. Index is zero-based, therefore the first page is at index 0. |
System.UInt64 | pdfObjectId | Object ID of the annotation to remove. |