Method SetText
SetText(string)
Attaches a textual representation to the attachment, replacing any previously extracted text.
public void SetText(string text)
Parameters
textstringThe text to associate with this attachment.
Remarks
Useful for supplying OCR results or curated descriptions for image-based attachments. Subsequent calls to GetText(CancellationToken) and GetTextAsync(CancellationToken) will return this text.
SetText(PageElement)
Attaches a textual representation to the attachment from a PageElement structure, overriding any previously set text elements.
public void SetText(PageElement pageElement)
Parameters
pageElementPageElementThe page element containing text content to associate with this attachment.
Remarks
The provided element is cloned internally. Subsequent text retrieval returns the attached element's content.