I believe I have found the solution to this issue.
I needed to render the PDF with setGenerateServerAppearance(true), and then send the output directly into Assembler to convert it to a Static XFA, with Tagging renderAtClient set False, and Tagging enabled without re-opening the document.
This generates the proper flowed content and split text fields render as expected without scrollbars or plus signs.
Here is the DDX for Asssembler:
<DDX xmlns="http://ns.adobe.com/DDX/1.0/">
<PDF result="flattenedform.pdf" save="Full">
<PDF source="docsource"><NoXFA flatten="true"/></PDF>
</PDF>
<XFAConversionSettings renderAtClient="false" tagged="true"/>
</DDX>
Here is some code I put together in Workbench/ExecuteScript that does what I needed: (not the cleanest)
/*
patExecContext.getProcessDataStringValue("/process_data/xmlResult/RESULT/err_dttm")
getProcessDataDocumentValue
getProcessDataStringValue
http://192.168.1.72:8080/lc/libs/ws/index.html
*/
import java.io.IOException;
import javax.servlet.Servlet;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.adobe.livecycle.assembler.client.* ;
import com.adobe.livecycle.contentservices.client.CRCResult;
import com.adobe.livecycle.contentservices.client.impl.DocumentManagementServiceClientImpl;
import com.adobe.livecycle.formsservice.client.* ;
import com.adobe.livecycle.formsservice.client;
import java.util.* ;
import java.util.Map;
import java.util.Entry;
import java.io.InputStream;
import java.io.File;
import java.io.FileInputStream;
import com.adobe.idp.Document;
import com.adobe.idp.dsc.clientsdk.ServiceClientFactory;
import com.adobe.idp.dsc.clientsdk.ServiceClientFactoryProperties;
import com.adobe.livecycle.formdataintegration.client.* ;
System.out.println("@@@ AEMF Test @@@");
//Create a ServiceClientFactory object
ServiceClientFactory myFactory = ServiceClientFactory.createInstance();
System.out.println("@@@ AEMF A @@@");
//Create a FormsServiceClient object
FormsServiceClient formsClient = new FormsServiceClient(myFactory);
System.out.println("@@@ AEMF B @@@");
//Create and load document variables for the Document XML Data, and the DDX
Document oInputData = patExecContext.getProcessDataDocumentValue("/process_data/xmlData");
Document myDDXFile = patExecContext.getProcessDataDocumentValue("/process_data/xmlDDX");
System.out.println("@@@ AEMF C @@@");
//Get the form design from Content Services (deprecated)
Document formDesign = patExecContext.getProcessDataDocumentValue("/process_data/docTemplate");
System.out.println("@@@ AEMF D @@@");
//Cache the PDF form
PDFFormRenderSpec pdfFormRenderSpec = new PDFFormRenderSpec();
pdfFormRenderSpec.setAcrobatVersion(AcrobatVersion.Acrobat_8);
pdfFormRenderSpec.setCacheEnabled(new Boolean(true));
pdfFormRenderSpec.setLinearizedPDF(true);
pdfFormRenderSpec.setGenerateServerAppearance(true);
pdfFormRenderSpec.setTaggedPDF(true);
//pdfFormRenderSpec.setRenderAtClient(RenderAtClient.No);
//Invoke the renderPDFForm2 and pass to the Document that contains the form design
System.out.println("@@@ AEMF E @@@");
FormsResult formOut = formsClient.renderPDFForm2(
formDesign,
oInputData,
pdfFormRenderSpec,
null,
null);
System.out.println("@@@ AEMF F @@@");
//Create a Document object that stores form data
Document myData = formOut.getOutputContent();
System.out.println("@@@ AEMF G @@@");
//Get the content type of the response and
//set the HttpServletResponse object?s content type
String contentType = myData.getContentType();
//resp.setContentType(contentType);
System.out.println("@@@ AEMF H @@@");
// ASSEMBLER
//Create a ServiceClientFactory instance
ServiceClientFactory myASMFactory = ServiceClientFactory.createInstance();
//Create an AssemblerServiceClient object
AssemblerServiceClient assemblerClient = new AssemblerServiceClient(myASMFactory);
System.out.println("@@@ AEMF I @@@");
//Create an empty Output document
// Map<String, Object> inputs = new HashMap<String, Object>();
Document outDoc = null;
System.out.println("@@@ AEMF J @@@");
//Create a Document object based on the source file
Document myPDFDXXSource = new Document(myData);
//Create a map to contain the input assets
Map inputs = new HashMap();
//Place the entry into the Map object
inputs.put("docsource",myPDFDXXSource);
//Create a Document object based on the DDX file data
Document myDDX = new Document(myDDXFile);
//Create an AssemblerOptionsSpec object
AssemblerOptionSpec assemblerSpec = new AssemblerOptionSpec();
assemblerSpec.setFailOnError(false);
//Submit the job to Assembler service and get back a non-interactive PDF document
AssemblerResult jobResult = assemblerClient.invokeDDX(myDDX, inputs, assemblerSpec);
//Get the Documents from the job result object
java.util.Map allDocs = jobResult.getDocuments();
System.out.println(allDocs);
//Get the first result document
int count = 1;
for (Iterator i = allDocs.entrySet().iterator(); i.hasNext(); ) {
// Retrieve the Map object's value
Map.Entry e = (Map.Entry)i.next();
//Get the key name as specified in the
//DDX document
String keyName = (String)e.getKey();
System.out.println("---->" + keyName);
Object o = e.getValue();
outDoc = (Document)o;
System.out.println("Before Temp");
Document myDDXOutData = outDoc;
System.out.println("After Temp");
}
System.out.println("@@@ AEMF K @@@");
//Save the non-interactive PDF document
Document myDDXOutData = outDoc;
System.out.println("@@@ AEMF Test @@@");
patExecContext.setProcessDataDocumentValue("/process_data/docResult", myData);
patExecContext.setProcessDataDocumentValue("/process_data/docDDXResult", myDDXOutData);
Thanks Again for your interest and assistance.
Mark