Class Text_Api
java.lang.Object
com.ironsoftware.ironpdf.internal.staticapi.Text_Api
The type Text api.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic StringextractAllText(InternalPdfDocument internalPdfDocument) Extracts the written text content from the PDF and returns it as a string.static StringextractAllText(InternalPdfDocument internalPdfDocument, Iterable<Integer> pageIndexes) Extracts the written text content from the PDF and returns it as a string.static voidreplaceTextOnPage(InternalPdfDocument internalPdfDocument, int pageIndex, String oldText, String newText) Replace the specified old text with new text on a given page
- 
Constructor Details- 
Text_Apipublic Text_Api()
 
- 
- 
Method Details- 
extractAllTextExtracts the written text content from the PDF and returns it as a string.Pages are separated by 4 consecutive Environment.NewLines - Parameters:
- internalPdfDocument- the internal pdf document
- Returns:
- All text in the PDF as a string.
 
- 
extractAllTextpublic static String extractAllText(InternalPdfDocument internalPdfDocument, Iterable<Integer> pageIndexes) Extracts the written text content from the PDF and returns it as a string.Pages are separated by 4 consecutive Environment.NewLines - Parameters:
- internalPdfDocument- the internal pdf document
- pageIndexes- page indexes to extract text (defaults to all pages)
- Returns:
- All text in the PDF as a string.
 
- 
replaceTextOnPagepublic static void replaceTextOnPage(InternalPdfDocument internalPdfDocument, int pageIndex, String oldText, String newText) Replace the specified old text with new text on a given page- Parameters:
- internalPdfDocument- the internal pdf document
- pageIndex- Page index to search for old text to replace
- oldText- Old text to remove
- newText- New text to add
 
 
-