iText 8.0.2 API
iText.Kernel.Pdf.Canvas.Parser.PdfTextExtractor Class Reference

Static Public Member Functions

static String  GetTextFromPage (PdfPage page, ITextExtractionStrategy strategy, IDictionary< String, IContentOperator > additionalContentOperators)
  Extract text from a specified page using an extraction strategy. More...
 
static String  GetTextFromPage (PdfPage page, ITextExtractionStrategy strategy)
  Extract text from a specified page using an extraction strategy. More...
 
static String  GetTextFromPage (PdfPage page)
  Extract text from a specified page using the default strategy. More...
 

Member Function Documentation

◆ GetTextFromPage() [1/3]

static String iText.Kernel.Pdf.Canvas.Parser.PdfTextExtractor.GetTextFromPage ( PdfPage  page )
inlinestatic

Extract text from a specified page using the default strategy.

Extract text from a specified page using the default strategy. Node: the default strategy is subject to change. If using a specific strategy is important, please use GetTextFromPage(iText.Kernel.Pdf.PdfPage, iText.Kernel.Pdf.Canvas.Parser.Listener.ITextExtractionStrategy) .

Parameters
page the page for the text to be extracted from
Returns
the extracted text

◆ GetTextFromPage() [2/3]

static String iText.Kernel.Pdf.Canvas.Parser.PdfTextExtractor.GetTextFromPage ( PdfPage  page,
ITextExtractionStrategy  strategy 
)
inlinestatic

Extract text from a specified page using an extraction strategy.

Extract text from a specified page using an extraction strategy. Extraction strategy must be passed as a new object for every single page.

Parameters
page the page for the text to be extracted from
strategy the strategy to use for extracting text
Returns
the extracted text

◆ GetTextFromPage() [3/3]

static String iText.Kernel.Pdf.Canvas.Parser.PdfTextExtractor.GetTextFromPage ( PdfPage  page,
ITextExtractionStrategy  strategy,
IDictionary< String, IContentOperator additionalContentOperators 
)
inlinestatic

Extract text from a specified page using an extraction strategy.

Extract text from a specified page using an extraction strategy. Also allows registration of custom IContentOperators that can influence how (and whether or not) the PDF instructions will be parsed. Extraction strategy must be passed as a new object for every single page.

Parameters
page the page for the text to be extracted from
strategy the strategy to use for extracting text
additionalContentOperators an optional map of custom IContentOperator s for rendering instructions
Returns
the extracted text