PdfTextLayout Class
The text of a page with the position of its lines, words and glyphs (see PdfPage.ExtractTextLayout).
public sealed class PdfTextLayoutRemarks
By default, the lines are in the order of the content, not in a reading order: a new line starts where a glyph leaves the baseline of the previous one, goes back, or changes direction. With PdfTextReadingOrder.Layout, the lines are split at the wide gaps, grouped into blocks at the blank spaces of the page (columns, paragraphs), and ordered by their position.
Properties
| Name | Description |
|---|---|
| Blocks | Gets the blocks of the page, in the order of PdfTextLayout.Lines: with PdfTextReadingOrder.Layout, the groups of lines the blank spaces of the page separate; otherwise, one block that has all the lines (none when the page has no text). |
| Lines | Gets the lines of the page, in the order of the content or in the reading order (PdfTextExtractionOptions.ReadingOrder). |
| Text | Gets the text of the page: the text of the lines separated by line feeds, the result of PdfPage.ExtractText. |
Blocks
PdfTextLayout.csGets the blocks of the page, in the order of PdfTextLayout.Lines: with PdfTextReadingOrder.Layout, the groups of lines the blank spaces of the page separate; otherwise, one block that has all the lines (none when the page has no text).
public IReadOnlyList<PdfTextBlock> Blocks { get; }Property value
Lines
PdfTextLayout.csGets the lines of the page, in the order of the content or in the reading order (PdfTextExtractionOptions.ReadingOrder).
public IReadOnlyList<PdfTextLine> Lines { get; }Property value
Text
PdfTextLayout.csGets the text of the page: the text of the lines separated by line feeds, the result of PdfPage.ExtractText.
public string Text { get; }Property value
Methods
| Name | Description |
|---|---|
| ToString() | Returns a string that represents the current object. |