FormulaElement
Overview
FormulaElement is a class in Aspose.PDF FOSS for .NET.
Inherits from: IllustrationElement.
This class declares 22 methods for FormulaElement objects in .NET programs.
Available methods include: AddRef, AdjustPosition, AppendChild, ChangeParentElement, ClearChilds, ClearId, Detach, FindElements, GetMarkedContent, InsertChild, RemoveAndMoveItsChildObjectsToItsParent, RemoveChild, and 6 additional methods.
Public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package.
Properties: ActualText, AlternativeText, Attributes, ChildElements, ExpansionText, ID, and 11 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
ImagePath | string? | Read | Image file backing this illustration. |
ImageWidth | double | Read | Image-width override (0 = auto). |
ImageHeight | double | Read | Image-height override (0 = auto). |
Resolution | int | Read | Image resolution (DPI) override (0 = auto). |
StructureTextState | StructureTextState | Read | Text-state applied to this element’s inline content (stored only — the FOSS structure builder doesn’t re-render through it). |
Attributes | StructureElementAttributes | Read | The structure attributes (/A) attached to this element, organised by owner. |
StructureType | StructureTypeStandard? | Read | The element’s standard structure type. |
S | StructureType | Read | The element’s structure type (/S) as a StructureType whose Name is the role tag (e.g. |
ActualText | string | Read/Write | The replacement text for the marked content (/ActualText). |
AlternativeText | string | Read/Write | Alternate text used by assistive technology (/Alt). |
ExpansionText | string | Read/Write | Expansion text for an abbreviation (/E). |
Language | string | Read/Write | BCP-47 language code for the element’s content (/Lang). |
ID | string | Read | Element identifier (/ID); read-only — assigned at save. |
Title | string | Read/Write | Title of the structure element (/T). |
Page | Page? | Read | Page hosting this element’s content. |
ParentElement | StructureElement? | Read | The parent structure element, or null when this element is detached or directly under the structure-tree root. |
ChildElements | ElementList | Read | Direct children of this element. |
Methods
| Signature | Description |
|---|---|
SetImage(imagePath: string) | Bind a raster/vector picture to this illustration. |
SetImage(imagePath: string, width: double, height: double) | Bind a picture with explicit dimensions. |
SetImage(imagePath: string, resolution: int) | Bind a picture with an explicit resolution (DPI). |
AppendChild(child: StructureElement) | Append child under this element’s /K array. |
AddRef(referencedStructureElement: StructureElement) | Record a /Ref association from this element to referencedStructureElement (PDF 32000 §14.7.4.3 — e.g. |
SetTag(tag: string) | Remap this element’s role to a custom tag, registering tag → its standard type in the document role map. |
ToString() | Textual representation used when dumping the structure tree (role name; falls back to the type name). |
FindElements(recursive: bool) | Recursively find descendant elements of type T. |
AppendChild(child: StructureElement, validate: bool) | Append child with an optional validation pass. |
SetText(text: string) | Set the element’s text content (stored as ActualText). |
SetId(id: string) | Set the element identifier (/ID). |
ClearId() | Remove the element identifier (/ID). |
AdjustPosition(settings: Aspose.Pdf.Tagged.PositionSettings) | Capture the requested layout position for an authored structure element: Margin, IsInNewPage and IsInLineParagraph are stored so the tagged-content renderer can place the block (Left/Right indent the column, Top/Bottom add space around it, IsInNewPage breaks the page, IsInLineParagraph flows the element inline). |
ChangeParentElement(newParent: StructureElement, validate: bool) | Move this element under newParent. |
RemoveAndMoveItsChildObjectsToItsParent(validate: bool) | Detach this element, then re-parent its children under this element’s former parent (taking this element’s slot). |
Detach() | Detach this element from its parent. |
ClearChilds() | Removes every child of this element, marked-content and object references included: the /K entry goes with them, and each removed element is detached so it can be placed again elsewhere. |
InsertChild(child: StructureElement, index: int) | Places child among this element’s children at the zero-based index, before the child that held that slot; an index at or past the end appends. |
RemoveChild(index: int) | Removes the child at the zero-based index and detaches it, its own children going with it. |
GetMarkedContent(includeDescendants: bool) | The content this element marks, in reading order: its marked-content sequences in the order of its /K, and (when includeDescendants) the content of its child elements where they stand among them. |
Tag(bdc: BDC) | Makes the marked-content sequence bdc opens the content of this element: a marked-content reference (/Type /MCR) naming the page and the sequence’s /MCID joins this element’s children, and the page’s parent tree points that id back here on save. |
Tag(annotation: Aspose.Pdf.Annotations.Annotation) | Makes annotation the content of this element: an object reference (/Type /OBJR) to the annotation joins this element’s children, and on save the annotation’s /StructParent and the parent tree point back here. |