API Reference
PdfTextSpan
A piece of text extracted from a PDF page with basic font and position info. Coordinates are in user space units (points) as emitted by content stream Tm/Td.
Inheritance
- Object
- PdfTextSpan
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by
- Method IPdfGlyphDecodingStage.Decode
- Method PdfReadPage.GetTextSpans
- Property PdfUnderstandingPageResult.DecodedRuns
- Property PdfUnderstandingWord.SourceRuns
Accepted by parameters
- Method IPdfWordGroupingStage.GroupWords
- Constructor PdfUnderstandingWord.PdfUnderstandingWord
Constructors
public PdfTextSpan(String text, String fontResource, Double fontSize, Double x, Double y, Double advance = 0, Nullable<OfficeColor> color = null, Boolean isVisible = true, Double rotationDegrees = 0, String baseFont = null) #Creates a new text span.
Parameters
- text System.String
- fontResource System.String
- fontSize System.Double
- x System.Double
- y System.Double
- advance System.Double = 0
- color System.Nullable{OfficeIMO.Drawing.OfficeColor} = null
- isVisible System.Boolean = true
- rotationDegrees System.Double = 0
- baseFont System.String = null
Inherited Methods
Properties
public String FontResource { get; } #Font resource name from the page resources (e.g., F1).
public String BaseFont { get; } #PDF base font name resolved from the active resource dictionary, when available.
public Double X { get; } #X position (points) in page user space.
public Double Y { get; } #Y position (points) in page user space.
public Double Advance { get; } #Advance width in user space for this span (includes spacing and hscale).
public Nullable<OfficeColor> Color { get; } #Fill color used for visual text rendering, when it could be read from the content stream.
public Boolean IsVisible { get; } #True when the text span should be painted during visual rendering.
public Double RotationDegrees { get; } #Baseline rotation in PDF user-space degrees, where positive angles are counter-clockwise.