You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by kushal sheth <ku...@gmail.com> on 2011/06/23 14:13:27 UTC
Overlapping issue is coming when try to set value using PDFBox
Hi All,
I am facing overlapping issue when i try to set value inside text box. Text
is getting overlapped.
This is the code that i have written to set values
PDDocument testDocument = null;
File input = new File("input.pdf");
testDocument = PDDocument.load(input);
PDDocumentCatalog documentCatalog = testDocument.getDocumentCatalog();
PDAcroForm acroForm = documentCatalog.getAcroForm();
PDField fieldFromDocument1 = acroForm.getField("testName");
fieldFromDocument1.setValue("Test Name");
PDDocument updatedTestDocument = testDocument;
updatedTestDocument.save("output.pdf");
Can anyone give suggestions to resolve this issue?
Thanks,
Kushal