Click or drag to resize

PdfText Class

Represents a snapshot mapping from a sequence of Unicode characters to a sequence of complete, partial or none PdfContentElements and provides various text related functionalities.
Inheritance Hierarchy
SystemObject
  SautinSoft.Pdf.ContentPdfText

Namespace: SautinSoft.Pdf.Content
Assembly: SautinSoft.Pdf (in SautinSoft.Pdf.dll) Version: 2026.5.19
Syntax
public sealed class PdfText

The PdfText type exposes the following members.

Properties
 NameDescription
Public propertyBounds Gets the bounds of the PdfText.
Public propertyElements Gets the PdfTextContents associated with the current PdfText.
Public propertyLength Gets the number of Unicode characters in the current PdfText object.
Top
Methods
 NameDescription
Public methodFind(Regex) Finds all matches of the specified regular expression in this PdfText instance.
Public methodFind(String, StringComparison) Finds all occurrences of the specified text in this PdfText instance.
Public methodRedact Removes the PDF content associated with the current PdfText.
Public methodSubtext(Int32) Retrieves a subtext from this instance. The subtext starts at a specified character position and continues to the end of the text.
Public methodSubtext(Int32, Int32) Retrieves a subtext from this instance. The subtext starts at a specified character position and has a specified length.
Public methodToString Returns a Unicode text contained in this PdfText.
(Overrides ObjectToString)
Top
Remarks
The PdfText is a snapshot and if the underlying PDF content is changed, that change won't be visible in the PdfText, instead PdfText should be retrieved again to get the actual snapshot.
See Also