We are using the sample code below to render the form.
Just recently, we noticed that when the form is rendered and the XML is exported using Adobe Acrobat, we see a new root showing on top of the previous root node. For example, of the data structure looks as follows:
<root> <customer_name>John</customer_name></root>
it will become like the following:
<xfa:data> <root> <customer_name>John</customer_name> </root></xfa:data>
Sample code used:
PDFFormRenderSpec pdfFormRenderSpec = new PDFFormRenderSpec( true, //boolean cacheEnabled null,//PDFVersion true,//boolean taggedPDF false,//boolean linearizedPDF null,//String seedPDF AcrobatVersion.Acrobat_9, null,//String xCIURI sCharSet,//String charset RenderAtClient.Yes,//key to dynamic forms! sLocale,// locale false, //standAlone FormModel.both, false//setXML ); //Specify URI values that are required to render a form URLSpec uriValues = new URLSpec(); uriValues.setContentRootURI("repository:///"); //Invoke the renderPDFForm method and write the //results to a client web browser FormsResult formOut = formsClient.renderPDFForm( formName, //formQuery oInputData, //inDataDoc pdfFormRenderSpec, //PDFFormRenderSpec uriValues, //urlSpec null //attachments ); //Create a Document object that stores form data myData = formOut.getOutputContent(); myData.passivate(); myData = readerExtensionsApply(sRECert, myFactory, myData);
Appreciate your help to resolve this problem.
Tarek