Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SignatureAnnotation

Signature field annotation.

Hierarchy

Index

Properties

annotationName

annotationName: string

Annotation name (NM entry).

annotationType

annotationType: AnnotationTypeCode

Annotation type.

Optional borderStyle

borderStyle: undefined | { dashArray?: number[]; horizontalCornerRadius: number; style: number; verticalCornerRadius: number; width: number }

Annotation's border style.

Optional color

color: Uint8ClampedArray | number[] | string | null

Annotation color.

Optional contents

contents: undefined | string

The text (or rich text) string that shall be displayed in the pop-up when the annotation is opened.

Optional convertToContent

convertToContent: undefined | false | true

Indicates whether the annotation will be converted to content when the document is saved.

creationDate

creationDate: string

Creation date.

Optional display

display: "visible" | "hidden"

The field is used for compatibility with Adobe Acrobat Reader.

Optional fileId

fileId: undefined | string

Image file identifier.

example
// Get signature image data:
const imageData = viewer.storage.getItem(signatureAnnotation.fileId);

Optional gcProps

gcProps: GcProps

Additional custom properties. Only available for use with GcPdf.

hasPopup

hasPopup: boolean

Indicates if annotation has associated popup annotation.

id

id: string

Annotation id.

invisibleFlag

invisibleFlag: boolean

True when annotation is not renderable.

Optional irtAnnotations

irtAnnotations: AnnotationBase[]

Internal helper property. Primary annotation's children annotations. Note, the array contains all children annotations, including annotations what is not direct descendant of the primary annotation.

isRichContents

isRichContents: boolean

Specifies whether or not the RichContent mode is used for the contents property.

locked

locked: boolean

Specifies whether the annotation can be edited.

example
var viewer = new GcPdfViewer('#root', { renderInteractiveForms: true , supportApi: { apiUrl: 'api/pdf-viewer', webSocketUrl: false } });
viewer.addDefaultPanels();
viewer.addAnnotationEditorPanel();
viewer.addFormEditorPanel();
viewer.addReplyTool();
viewer.onAfterOpen.register(()=>{
    // Lock all text annotations after document open:
    const resultArr = await viewer.findAnnotation(1, // 1 - AnnotationTypeCode.TEXT
                          { findField: 'annotationType',
                              pageNumberConstraint: 1, findAll: true });
    viewer.updateAnnotations(0, resultArr.map((data)=> { data.annotation.locked = true; return data.annotation; }));
});
// Open Annotations.pdf
viewer.open('Annotations.pdf');

modificationDate

modificationDate: string

Modification date.

Optional opacity

opacity: undefined | number

Annotation opacity.

orderIndex

orderIndex: number

The field order index.

Optional parentAnnotation

parentAnnotation: AnnotationBase

Resolved reference to parent annotation.

Optional parentId

parentId: undefined | string

Parent annotation id for popup annotation.

popupId

popupId: string

Popup annotation identifier.

printableFlag

printableFlag: boolean

Specifies whether or not the annotation can be printed.

rect

rect: number[]

The annotation's bounds ractangle: [x1, y1, x2, y2]. (0, 0) is the bottom left corner of the page.

referenceAnnotationId

referenceAnnotationId: string

Id of the primary annotation to which this annotation belongs. ("in reply to" value).

referenceType

referenceType: "R" | "Group"

R - this annotation is reply to the primary annotation specified by field referenceAnnotationId. Group - annotation should be grouped with primary annotation specified by field referenceAnnotationId.

Optional sharedChanges

sharedChanges: undefined | {}

Hash object with information about users who change this annotation. key - user name value - UNIX UTC timestamp when changes were added.

Optional state

Beginning with PDF 1.5, Annotations may have author-specific state associated with them. The state is not specified in the annotation itself but in separate text annotation that refers to the original annotation by means of its 'IRT' ("in reply to") entry.

Optional stateModel

The state model corresponding to state.

subject

subject: string

Text representing a short description of the subject being addressed by the annotation. The 'subject' is the meta information property and it can be used to group, sort or filter annotations.

subtype

Annotation sub-type. Possible values are: 'Text', 'Link', 'FreeText', 'Line', 'Square', 'Circle', 'Polygon', 'PolyLine', 'Highlight', 'Underline', 'Squiggly', 'Strikeout', 'Stamp', 'Caret', 'Ink', 'Popup', 'FileAttachment', 'Sound', 'Movie', 'Widget', 'Screen', 'PrinterMark', 'TrapNet', 'WaterMark', 'Redact', 'Signature', 'ThreadBead', 'RadioButton', 'Checkbox', 'PushButton', 'Choice', 'TextWidget'.

textAlignment

textAlignment: TextAlignmentType

The alignment of the text.

title

title: string

The text label that shall be displayed in the title bar of the annotation's popup when open and active. This entry shall identify the user who added the annotation.