public class ReplaceString extends Object
| Constructor and Description |
|---|
ReplaceString()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
doIt(String inputFile,
String outputFile,
String strToFind,
String message)
Locate a string in a PDF and replace it with a new string.
|
static void |
main(String[] args)
This will open a PDF and replace a string if it finds it.
|
public void doIt(String inputFile, String outputFile, String strToFind, String message) throws IOException, COSVisitorException
inputFile - The PDF to open.outputFile - The PDF to write to.strToFind - The string to find in the PDF document.message - The message to write in the file.IOException - If there is an error writing the data.COSVisitorException - If there is an error writing the PDF.public static void main(String[] args)
args - Command line arguments.Copyright © 2002–2019 The Apache Software Foundation. All rights reserved.