Class PdfTextExtractor
Extracts text, words and their positions from pages.
public static class PdfTextExtractor
- Inheritance
-
PdfTextExtractor
- Inherited Members
Methods
ExtractLines(PdfPage, TextExtractionOptions?)
Returns the lines of a page with words and positions.
public static IReadOnlyList<TextLineInfo> ExtractLines(PdfPage page, TextExtractionOptions? options = null)
Parameters
pagePdfPageoptionsTextExtractionOptions
Returns
ExtractText(PdfDocument, TextExtractionOptions?)
Returns the text of all pages separated by form feeds ('\f').
public static string ExtractText(PdfDocument document, TextExtractionOptions? options = null)
Parameters
documentPdfDocumentoptionsTextExtractionOptions
Returns
ExtractText(PdfPage, TextExtractionOptions?)
Returns the text of a page; lines are separated by '\n'.
public static string ExtractText(PdfPage page, TextExtractionOptions? options = null)
Parameters
pagePdfPageoptionsTextExtractionOptions
Returns
ExtractWords(PdfPage, TextExtractionOptions?)
Returns all words of a page with their bounding boxes.
public static IReadOnlyList<TextWord> ExtractWords(PdfPage page, TextExtractionOptions? options = null)
Parameters
pagePdfPageoptionsTextExtractionOptions
Returns
FindText(PdfPage, string, StringComparison)
Finds all occurrences of search on a page (within a line) and returns their bounding boxes,
e.g. to place a signature or stamp at a placeholder text.
public static IReadOnlyList<PdfRectangle> FindText(PdfPage page, string search, StringComparison comparison = StringComparison.Ordinal)
Parameters
pagePdfPagesearchstringcomparisonStringComparison
Returns
FindText(PdfPage, Regex)
Returns the bounds of all matches of pattern (matched per text line), e.g. IBANs or e-mail addresses.
public static IReadOnlyList<PdfRectangle> FindText(PdfPage page, Regex pattern)