|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pdfbox.examples.persistence.FieldsDoc
This example fills a field in a pdf document and writes it to new destination.
Constructor Summary | |
FieldsDoc()
Constructor. |
Method Summary | |
void |
doIt(String in,
String out,
String name,
String value)
fill a field in the pdf. |
static void |
main(String[] args)
This will fill a field in a PDF document. |
void |
setField(COSDocument doc,
COSString name,
COSString value)
lookup and fill the field. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FieldsDoc()
Method Detail |
public void doIt(String in, String out, String name, String value) throws IOException, COSVisitorException
in
- The template fileout
- The file to write the PDF to.name
- The name of the PDF field (FDF field)value
- The value to be used for the field
IOException
- If there is an error writing the data.
COSVisitorException
- If there is an error generating the PDF document.public static void main(String[] args)
args
- command line argumentspublic void setField(COSDocument doc, COSString name, COSString value)
doc
- the document where the field residesname
- the name of the PDF Annotation fieldvalue
- The desired value to be used for the field
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |