public final class FormProcessor extends Agent
Here's a snippet of code illustrating the use of a
FormProcessor().
import com.adobe.xfa.formprocessor.FormProcessor;
...
FormProcessor pa = new FormProcessor();
try {
InputStream template = ...
InputStream config = ...
InputStream data = ...
OutputStream out = ...
OutputStream log = ...
int ok = pa.execute(template, config, data, null, out, log, null, null);
if (ok == FAIL) {
// look at resulting log stream.
}
else {
// look at resulting out stream.
}
} catch (IOException o) {
...
} catch (ExFull e) {
System.err.println(e.toString());
}
| Modifier and Type | Field and Description |
|---|---|
static int |
HREF_CACHE_SIZE
The default size (51200), in filesystem bytes of memory,
for the cache used to hold loaded template fragments.
|
FAIL, SUCCESS, SUCCESS_WITH_INFORMATION, SUCCESS_WITH_WARNINGS| Constructor and Description |
|---|
FormProcessor()
Instantiates an XFA form processor.
|
FormProcessor(int cacheSize)
Instantiates an XFA form processor with a template
fragment cache of specified size.
|
| Modifier and Type | Method and Description |
|---|---|
int |
execute(InputStream oTemplate,
InputStream oXCI,
InputStream oData,
InputStream oXDC,
OutputStream oOutput,
OutputStream oInfo,
String masterPassword,
String userPassword)
Executes a form as directed by the specified inputs.
|
String |
getConfigSchemaName()
Retrieve the configuration schema tag name where the config options
are stored for this agent.
|
boolean |
loadXDP(InputStream is,
String sPackets,
boolean bReload) |
filterPackets, getPacketListpublic static final int HREF_CACHE_SIZE
Server-based applications may prefer to use custom values instead -- this being a relatively small value.
FormProcessor(int),
Constant Field Valuespublic FormProcessor()
public FormProcessor(int cacheSize)
cacheSize - the size of the template fragment cache.
This is the maximal size, in filesize bytes of memory, allowed of all loaded template fragments. Once exceeded, the DOM of loaded template fragments gets discarded on a fifo basis.
public String getConfigSchemaName()
AgentgetConfigSchemaName in class Agentpublic int execute(InputStream oTemplate, InputStream oXCI, InputStream oData, InputStream oXDC, OutputStream oOutput, OutputStream oInfo, String masterPassword, String userPassword) throws ExFull
oTemplate - the template input stream.oXCI - the configuration input stream.oData - the data input stream, if available.oXDC - the XFA XDC input stream if available. This is not currently supported.oOutput - the output stream. Currently, only XDP output is supported.oInfo - the info output stream.masterPassword - the encrypted PDF master password, if applicable.userPassword - the encrypted PDF user password, if applicable.Agent.SUCCESS, Agent.FAIL, ...ExFull - upon error.public boolean loadXDP(InputStream is, String sPackets, boolean bReload)
Copyright © 2010 - 2020 Adobe. All Rights Reserved