Class Text_Api
- java.lang.Object
-
- com.ironsoftware.ironpdf.internal.staticapi.Text_Api
-
public final class Text_Api extends Object
The type Text api.
-
-
Constructor Summary
Constructors Constructor Description Text_Api()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringextractAllText(InternalPdfDocument internalPdfDocument)Extracts the written text content from the PDF and returns it as a string.static StringextractAllText(InternalPdfDocument internalPdfDocument, List<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
-
-
-
Method Detail
-
extractAllText
public static String extractAllText(InternalPdfDocument internalPdfDocument)
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- Returns:
- All text in the PDF as a string.
-
extractAllText
public static String extractAllText(InternalPdfDocument internalPdfDocument, List<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 documentpageIndexes- page indexes to extract text (defaults to all pages)- Returns:
- All text in the PDF as a string.
-
replaceTextOnPage
public 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 documentpageIndex- Page index to search for old text to replaceoldText- Old text to removenewText- New text to add
-
-