I have a dynamic PDF that has to be filled with xml data. I am using the following code to fill the pdf using java:
com.aspose.pdf.facades.Form form = new com.aspose.pdf.facades.Form();
form.bindPdf(“c:/pdf/template.pdf”);
java.io.FileInputStream xmlInputStream = new FileInputStream(“c:/pdf/sample_xml.xml”);
form.importXml(xmlInputStream);
xmlInputStream.close();
form.save(“c:/pdf/FilledPDFFile.pdf”);
form.dispose();
By doing so, the data is getting populated correctly but all the fields are getting flattened automatically and the pdf is no more interactive. I want to retain the pdf as interactive form with data filled in. In itext I was able to achieve this using append mode in pdf doc. Is there something similar in aspose?
Also, I have one more query. The interactive pdf has a button which can be clicked to attach csv documents. Is there a way to trigger the button action and attach the csv doc through aspose library? Please help me on this. TIA.