public class SetField extends AbstractExample
| Constructor and Description |
|---|
SetField() |
| Modifier and Type | Method and Description |
|---|---|
static void |
main(String[] args)
This will read a PDF file and set a field and then write it the pdf out again.
|
void |
setField(org.apache.pdfbox.pdmodel.PDDocument pdfDocument,
String name,
String value)
This will set a single field in the document.
|
public void setField(org.apache.pdfbox.pdmodel.PDDocument pdfDocument,
String name,
String value)
throws IOException
pdfDocument - The PDF to set the field in.name - The name of the field to set.value - The new value of the field.IOException - If there is an error setting the field.public static void main(String[] args) throws IOException, org.apache.pdfbox.exceptions.COSVisitorException
args - command line argumentsIOException - If there is an error importing the FDF document.org.apache.pdfbox.exceptions.COSVisitorException - If there is an error writing the PDF.Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.