We are using XDP file and XML files to generate the PDF document. We have check boxes in the PDF and javascript included in the XDP file. It is loosing the check box functionality in generated PDF.
Code Snippet
var file = new java.io.File(templateFolder, pdfTemplate);
var inDoc = new com.adobe.aemfd.docmanager.Document(new java.io.FileInputStream(file));
var xmlDoc = new com.adobe.aemfd.docmanager.Document(xmlDataPart.getInputStream());
var xciDoc = new com.adobe.aemfd.docmanager.Document(xciTemp);
var pdfOptions = new com.adobe.fd.output.api.PDFOutputOptions();
//Set PDF properties using XCI template
pdfOptions.setXci(xciDoc);
//Flatten PDF
var outputService = sling.getService(Packages.com.adobe.fd.output.api.OutputService);
var result = outputService.generatePDFOutput(inDoc, xmlDoc, pdfOptions);