public final class Text_Api extends Object
Constructor and Description |
---|
Text_Api() |
Modifier and Type | Method and Description |
---|---|
static String |
extractAllText(InternalPdfDocument internalPdfDocument)
Extracts the written text content from the PDF and returns it as a string.
|
static String |
extractAllText(InternalPdfDocument internalPdfDocument,
Iterable<Integer> pageIndexes)
Extracts the written text content from the PDF and returns it as a string.
|
static void |
replaceTextOnPage(InternalPdfDocument internalPdfDocument,
int pageIndex,
String oldText,
String newText)
Replace the specified old text with new text on a given page
|
public static String extractAllText(InternalPdfDocument internalPdfDocument)
Pages are separated by 4 consecutive Environment.NewLines
internalPdfDocument
- the internal pdf documentpublic static String extractAllText(InternalPdfDocument internalPdfDocument, Iterable<Integer> pageIndexes)
Pages are separated by 4 consecutive Environment.NewLines
internalPdfDocument
- the internal pdf documentpageIndexes
- page indexes to extract text (defaults to all pages)public static void replaceTextOnPage(InternalPdfDocument internalPdfDocument, int pageIndex, String oldText, String newText)
internalPdfDocument
- the internal pdf documentpageIndex
- Page index to search for old text to replaceoldText
- Old text to removenewText
- New text to addCopyright © 2022–2023 Iron Software. All rights reserved.