Sir,
I have been successful in developing the code to set values to the form-fields
of a PDF doument. I have a few questions listed below related to merging of 2
PDF documents as well as about setting fonts. Can someone help?
1. I have 3 PDF documents where I have set the form-field values in each of
them. I want to combine the 3 PDF documents to create a single PDF document. I
have tried the addPage option as well as importPage option but the issue is
that the form fields of second and third PDF documents are not visible (or not
set) in the combined document.
try {
PDDocument document = PDDocument.load("test.pdf");
PDDocument doc = PDDocument.load("test1.pdf");
List allPages = doc.getDocumentCatalog().getAllPages();
PDPage page = (PDPage)allPages.get(0);
PDPage page1 = doc.importPage(page);
document.importPage(page1);
document.save("parent_1.pdf");
document.close();
doc.close();
} catch (Exception e) {
}
2. When we set the value of a form field in a PDF document using the setValue
option, can I specify the font type and size using which the value needs to be
displayed (overriding the font type and size used while creating the control)?
This has been my third posting and unfortunately <|:-( there has been no
response to the other two! Hope I am lucky with this one! <|:-)
Thanks & Regards
Venkatesh Prasad.B.K.