# StructElement

## Content

# Class: StructElement

Represents a PDF tag (structure element) in a document's structure tree.

## Extends

- [`StructTreeItem`](StructTreeItem)

## Constructors

### Constructor

```ts
new StructElement(type?): StructElement;
```

Creates a new StructElement object.

#### Parameters

##### type?

`string`

The element's structure type.

#### Returns

`StructElement`

#### Overrides

```ts
StructTreeItem.constructor
```

### Constructor

```ts
new StructElement(om, type?): StructElement;
```

Creates a new StructElement object.

#### Parameters

##### om

[`ObjectManager`](ObjectManager)

An object manager that controls the lifetime of the StructElement object.

##### type?

`string`

The element's structure type.

#### Returns

`StructElement`

#### Overrides

```ts
StructTreeItem.constructor
```

## Accessors

### actualText

#### Get Signature

```ts
get actualText(): string;
```

Gets a text that is an exact replacement for the structure element and its children.

##### Returns

`string`

#### Set Signature

```ts
set actualText(value): void;
```

Sets a text that is an exact replacement for the structure element and its children.

##### Parameters

###### value

`string`

##### Returns

`void`

***

### alternateDescription

#### Get Signature

```ts
get alternateDescription(): string;
```

Gets the alternate description of the structure element and its children in human-readable form.

##### Returns

`string`

#### Set Signature

```ts
set alternateDescription(value): void;
```

Sets the alternate description of the structure element and its children in human-readable form.

##### Parameters

###### value

`string`

##### Returns

`void`

***

### associatedFiles

#### Get Signature

```ts
get associatedFiles(): AssociatedFiles;
```

Gets the list of embedded files associated with this StructElement.

##### Returns

[`AssociatedFiles`](AssociatedFiles)

***

### attrClasses

#### Get Signature

```ts
get attrClasses(): AttrClsRevisionCollection;
```

Gets the collection of attribute classes associated with this structure element.

##### Returns

[`AttrClsRevisionCollection`](AttrClsRevisionCollection)

***

### attrs

#### Get Signature

```ts
get attrs(): AttrRevisionCollection;
```

Gets the collection of attributes associated with this structure element.

##### Returns

[`AttrRevisionCollection`](AttrRevisionCollection)

***

### children

#### Get Signature

```ts
get children(): StructElementCollection;
```

Gets the collection of child StructElement objects (a view over [StructElement#items](#items)).

##### Returns

[`StructElementCollection`](StructElementCollection)

***

### contentItems

#### Get Signature

```ts
get contentItems(): ContentItemLinkCollection;
```

Gets the collection of [ContentItemLink](ContentItemLink) objects (a view over [StructElement#items](#items)).

##### Returns

[`ContentItemLinkCollection`](ContentItemLinkCollection)

***

### defaultPage

#### Get Signature

```ts
get defaultPage(): PdfPage;
```

Gets the [PdfPage](PdfPage) object used as the default page for the content items owned by
this StructElement.

##### Returns

[`PdfPage`](PdfPage)

#### Set Signature

```ts
set defaultPage(value): void;
```

Sets the [PdfPage](PdfPage) object used as the default page for the content items owned by
this StructElement.

##### Parameters

###### value

[`PdfPage`](PdfPage)

##### Returns

`void`

***

### elementId

#### Get Signature

```ts
get elementId(): string;
```

Gets the element identifier designating this structure element. The value must be unique
among all elements in the document's structure hierarchy.
(Named `elementId` to avoid clashing with [ObjectBase#id](ObjectBase#id).)

##### Returns

`string`

#### Set Signature

```ts
set elementId(value): void;
```

Sets the element identifier designating this structure element. The value must be unique
among all elements in the document's structure hierarchy.
(Named `elementId` to avoid clashing with [ObjectBase#id](ObjectBase#id).)

##### Parameters

###### value

`string`

##### Returns

`void`

***

### expandedAbbreviation

#### Get Signature

```ts
get expandedAbbreviation(): string;
```

Gets the expanded form of an abbreviation.

##### Returns

`string`

#### Set Signature

```ts
set expandedAbbreviation(value): void;
```

Sets the expanded form of an abbreviation.

##### Parameters

###### value

`string`

##### Returns

`void`

***

### hasAssociatedFiles

#### Get Signature

```ts
get hasAssociatedFiles(): boolean;
```

Gets a value indicating whether the [StructElement#associatedFiles](#associatedfiles) collection contains any items.

##### Returns

`boolean`

***

### hasAttrClasses

#### Get Signature

```ts
get hasAttrClasses(): boolean;
```

Gets a value indicating whether the [StructElement#attrClasses](#attrclasses) collection contains any items.

##### Returns

`boolean`

***

### hasAttrs

#### Get Signature

```ts
get hasAttrs(): boolean;
```

Gets a value indicating whether the [StructElement#attrs](#attrs) collection contains any items.

##### Returns

`boolean`

***

### hasItems

#### Get Signature

```ts
get hasItems(): boolean;
```

Gets a value indicating whether the [StructElement#items](#items) collection contains any items.

##### Returns

`boolean`

***

### id

#### Get Signature

```ts
get id(): number;
```

Gets the reference to the object.

##### Returns

`number`

#### Inherited from

[`StructTreeItem`](StructTreeItem).[`id`](StructTreeItem#id)

***

### items

#### Get Signature

```ts
get items(): StructTreeItemCollection;
```

Gets the collection of nested [StructTreeItem](StructTreeItem) objects.

##### Returns

[`StructTreeItemCollection`](StructTreeItemCollection)

***

### ns

#### Get Signature

```ts
get ns(): Namespace;
```

Gets the [Namespace](Namespace) object defining the namespace this element belongs to.

##### Returns

[`Namespace`](Namespace)

#### Set Signature

```ts
set ns(value): void;
```

Sets the [Namespace](Namespace) object defining the namespace this element belongs to.

##### Parameters

###### value

[`Namespace`](Namespace)

##### Returns

`void`

***

### om

#### Get Signature

```ts
get om(): ObjectManager;
```

Gets the owner [ObjectManager](ObjectManager) instance.

##### Returns

[`ObjectManager`](ObjectManager)

#### Inherited from

[`StructTreeItem`](StructTreeItem).[`om`](StructTreeItem#om)

***

### parent

#### Get Signature

```ts
get parent(): StructElement;
```

Gets the parent StructElement object, or null if there is none.

##### Returns

`StructElement`

***

### title

#### Get Signature

```ts
get title(): string;
```

Gets the title of the structure element, a text string representing it in human-readable form.

##### Returns

`string`

#### Set Signature

```ts
set title(value): void;
```

Sets the title of the structure element, a text string representing it in human-readable form.

##### Parameters

###### value

`string`

##### Returns

`void`

***

### type

#### Get Signature

```ts
get type(): string;
```

Gets the structure type, a string identifying the nature of the structure element and its
role within the document, such as chapter, paragraph, or footnote.

##### Returns

`string`

#### Set Signature

```ts
set type(value): void;
```

Sets the structure type, a string identifying the nature of the structure element and its
role within the document, such as chapter, paragraph, or footnote.

##### Parameters

###### value

`string`

##### Returns

`void`

## Methods

### free()

```ts
free(): void;
```

Detaches the object from the [ObjectManager](ObjectManager) and deallocates its memory, if possible.

#### Returns

`void`

#### Inherited from

[`StructTreeItem`](StructTreeItem).[`free`](StructTreeItem#free)

***

### rebind()

```ts
rebind(omTo): void;
```

Rebinds the object from the current [ObjectManager](ObjectManager) to the specified one.

#### Parameters

##### omTo

[`ObjectManager`](ObjectManager)

The new [ObjectManager](ObjectManager) for the object.

#### Returns

`void`

#### Inherited from

[`StructTreeItem`](StructTreeItem).[`rebind`](StructTreeItem#rebind)
