Resource Base
Table of contents

Polyline Class

API Index

API Name Description
uid Return the uid of the annotation.
pageUid Return the uid of the page where the annotation is located.
creationDate Return the creation date of the annotation.
modificationDate Return the modification date of the annotation.
getOptions() Get the annotation options.
updateOptions() Update the annotation options.

uid

Return the uid of the annotation.

Syntax

readonly uid: string;

pageUid

Return the uid of the page where the annotation is located.

Syntax

readonly pageUid: string;

Remark

  • It will return '', if the annotation is be deleted.

creationDate

Return the creation date of the annotation.

Syntax

readonly creationDate: string;

Remark

  • The string would be D:YYYYMMDDHHmmSSOHH'mm', like D:20230101085959-08'00'.

modificationDate

Return the modification date of the annotation.

Syntax

readonly modificationDate: string;

Remark

  • The string would be D:YYYYMMDDHHmmSSOHH'mm', like D:20230101085959-08'00'.
  • It will return '', if the annotation is be deleted.
  • If the annotation is created but not be modified after adding, it equals to creationDate.

getOptions()

Get the annotation options.

Syntax

getOptions(): PolylineAnnotationOptions;

Return value

The object of polyline annotation options. Please refer to PolylineAnnotationOptions.

Code Snippet

// Given that editViewer is an existing instance of EditViewer and a document is currently open.
const pageUid = editViewer.indexToUid(0);
const polyline = Dynamsoft.DDV.annotationManager.createAnnotation(pageUid, "polyline"); // Create a default Polyline annotation instance.
const polylineOptions = polyline.getOptions();

updateOptions()

Update the annotation options.

Syntax

updateOptions(polylineannotationoptions: PolylineAnnotationOptions): boolean;

Parameters

polylineannotationoptions: The new polyline annotation options. Please refer to PolylineAnnotationOptions.

Return value

true: Successfully.

false: Failed.

Code Snippet

// Given that editViewer is an existing instance of EditViewer and a document is currently open.
const pageUid = editViewer.indexToUid(0);
const polyline = Dynamsoft.DDV.annotationManager.createAnnotation(pageUid, "polyline"); // Create a default Polyline annotation instance.
const polylineOptions = {
    lineEnding: {
        end: Dynamsoft.DDV.EnumLineEnding.OPEN,
    },
};
polyline.updateOptions(polylineOptions); // Update the line ending of the polyline to open.

Warning

Error Code Error Message API Return Value
-80100 XXX(API): XXX(ParameterName) is invalid. false
-80102 XXX(API): XXX(ParameterName) is missing. false

This page is compatible for:

Is this page helpful?

YesYes NoNo

In this article:

latest version

    • Latest version(2.0)
    • Version 1.x
      • Version 1.1
    Change +