[]
        
(Showing Draft Content)

DefaultAppearance

DsPdfJS API v9.1.0


DsPdfJS API / DefaultAppearance

Class: DefaultAppearance

Represents the default appearance of an annotation.

Extends

Accessors

font

Get Signature

get font(): Font | null

Gets or sets the Font object.

In a newly created document the value of this property is null. If the value has not been set when the document is saved (and for fields, the owner field has been added to PdfDocument), a default value is automatically assigned depending on the type of the current object's owner:

  1. TextField, ComboBoxField, CombTextField, ListBoxField, PushButtonField The default font is Helvetica, 9pt, Black.
  2. CheckBoxField, RadioButtonField The default font is ZapfDingbats, 0 (meaning auto-size), Black. (Note that for these field types ZapfDingbats will always be used regardless of the current setting.)
  3. RedactAnnotation, FreeTextAnnotation The default font is Helvetica, 9pt, Black.

When setting this property, you may use FontCollection#searchFont or other FontCollection methods to find a suitable font.

Returns

Font | null

Set Signature

set font(value): void

Gets or sets the Font object.

In a newly created document the value of this property is null. If the value has not been set when the document is saved (and for fields, the owner field has been added to PdfDocument), a default value is automatically assigned depending on the type of the current object's owner:

  1. TextField, ComboBoxField, CombTextField, ListBoxField, PushButtonField The default font is Helvetica, 9pt, Black.
  2. CheckBoxField, RadioButtonField The default font is ZapfDingbats, 0 (meaning auto-size), Black. (Note that for these field types ZapfDingbats will always be used regardless of the current setting.)
  3. RedactAnnotation, FreeTextAnnotation The default font is Helvetica, 9pt, Black.

When setting this property, you may use FontCollection#searchFont or other FontCollection methods to find a suitable font.

Parameters
value

Font | null

Returns

void


fontSize

Get Signature

get fontSize(): number | null

Gets or sets the font size in points.

In a newly created document the value of this property is null. If the value has not been set when the document is saved (and for fields, the owner field has been added to PdfDocument), a default value is automatically assigned depending on the type of the current object's owner:

  1. TextField, ComboBoxField, CombTextField, ListBoxField, PushButtonField The default font is Helvetica, 9pt, Black.
  2. CheckBoxField, RadioButtonField The default font is ZapfDingbats, 0 (meaning auto-size), Black. (Note that for these field types ZapfDingbats will always be used regardless of the current setting.)
  3. RedactAnnotation, FreeTextAnnotation The default font is Helvetica, 9pt, Black.
Returns

number | null

Set Signature

set fontSize(value): void

Gets or sets the font size in points.

In a newly created document the value of this property is null. If the value has not been set when the document is saved (and for fields, the owner field has been added to PdfDocument), a default value is automatically assigned depending on the type of the current object's owner:

  1. TextField, ComboBoxField, CombTextField, ListBoxField, PushButtonField The default font is Helvetica, 9pt, Black.
  2. CheckBoxField, RadioButtonField The default font is ZapfDingbats, 0 (meaning auto-size), Black. (Note that for these field types ZapfDingbats will always be used regardless of the current setting.)
  3. RedactAnnotation, FreeTextAnnotation The default font is Helvetica, 9pt, Black.
Parameters
value

number | null

Returns

void


foreColor

Get Signature

get foreColor(): Color | null

Gets or sets the foreground color.

In a newly created document the value of this property is null. If the value has not been set when the document is saved (and for fields, the owner field has been added to PdfDocument), a default value is automatically assigned depending on the type of the current object's owner:

  1. TextField, ComboBoxField, CombTextField, ListBoxField, PushButtonField The default font is Helvetica, 9pt, Black.
  2. CheckBoxField, RadioButtonField The default font is ZapfDingbats, 0 (meaning auto-size), Black. (Note that for these field types ZapfDingbats will always be used regardless of the current setting.)
  3. RedactAnnotation, FreeTextAnnotation The default font is Helvetica, 9pt, Black.
Returns

Color | null

Set Signature

set foreColor(value): void

Gets or sets the foreground color.

In a newly created document the value of this property is null. If the value has not been set when the document is saved (and for fields, the owner field has been added to PdfDocument), a default value is automatically assigned depending on the type of the current object's owner:

  1. TextField, ComboBoxField, CombTextField, ListBoxField, PushButtonField The default font is Helvetica, 9pt, Black.
  2. CheckBoxField, RadioButtonField The default font is ZapfDingbats, 0 (meaning auto-size), Black. (Note that for these field types ZapfDingbats will always be used regardless of the current setting.)
  3. RedactAnnotation, FreeTextAnnotation The default font is Helvetica, 9pt, Black.
Parameters
value

Color | null

Returns

void


id

Get Signature

get id(): number

Gets the reference to the object.

Returns

number

Inherited from

ObjectBase.id


om

Get Signature

get om(): ObjectManager

Gets the owner ObjectManager instance.

Returns

ObjectManager

Inherited from

ObjectBase.om


text

Get Signature

get text(): string | null

Gets or sets the text representing the appearance as it will be stored in a PDF stream (e.g. "/DF0 10 Tf 0 0 0 rg").

Please see the PDF specification for details.

Returns

string | null

Set Signature

set text(value): void

Gets or sets the text representing the appearance as it will be stored in a PDF stream (e.g. "/DF0 10 Tf 0 0 0 rg").

Please see the PDF specification for details.

Parameters
value

string | null

Returns

void

Methods

free()

free(): void

Detaches the object from the ObjectManager and deallocates its memory, if possible.

Returns

void

Inherited from

ObjectBase.free


rebind()

rebind(omTo): void

Rebinds the object from the current ObjectManager to the specified one.

Parameters

omTo

ObjectManager

The new ObjectManager for the object.

Returns

void

Inherited from

ObjectBase.rebind