com.adobe.icc.ddg.api
Interface LetterRenderService


public interface LetterRenderService

Dynamic Document Generation a.k.a Letter Rendering Service that accepts a Letter definition and an initial data XML to render a Letter as a PDF, either interactive or non-interactive.


Field Summary
static String LAYOUT_TEMPLATE_KEY
           
static String XML_DATA_KEY
           
 
Method Summary
 Map processLetter(Letter letter, String initialDataXML, boolean useTestData)
          Process the given Letter object, preparing the augmented layout template and final XML data that can be merged together in the desired render format.
 Map processLetter(String letterId, String initialDataXML, boolean useTestData)
          Process the Letter identified by the given Letter ID, preparing the augmented layout template and final XML data that can be merged together in the desired render format.
 byte[] renderLetter(Letter letter, String dataXML, boolean renderInteractive)
          Render the given Letter object against the given data XML.
 PDFResponseType renderLetter(Letter letter, String initialDataXML, boolean mergeDataOnServer, boolean useTestData, boolean renderInteractive)
          Render the CTD against the given data XML.
 PDFResponseType renderLetter(Letter letter, String initialDataXML, boolean mergeDataOnServer, boolean useTestData, boolean renderInteractive, boolean saveToFile)
          Render the CTD against the given data XML.
 byte[] renderLetter(String letterId, String dataXML, boolean renderInteractive)
          Render the given Letter, identified by the letter ID, against the given data XML.
 PDFResponseType renderLetter(String letterId, String initialDataXML, boolean mergeDataOnServer, boolean useTestData, boolean renderInteractive)
          Render the CTD against the given data XML.
 PDFResponseType renderLetter(String letterId, String initialDataXML, boolean mergeDataOnServer, boolean useTestData, boolean renderInteractive, boolean saveToFile)
          Render the CTD against the given data XML.
 

Field Detail

LAYOUT_TEMPLATE_KEY

static final String LAYOUT_TEMPLATE_KEY
See Also:
Constant Field Values

XML_DATA_KEY

static final String XML_DATA_KEY
See Also:
Constant Field Values
Method Detail

renderLetter

PDFResponseType renderLetter(Letter letter,
                             String initialDataXML,
                             boolean mergeDataOnServer,
                             boolean useTestData,
                             boolean renderInteractive)
                             throws ICCException
Render the CTD against the given data XML. If there is a need to simply render the Letter without merging data with it, *mergeData* should be set to false.

Parameters:
letter - Correspondence Template to be rendered -- must be the *full* letter object containing all necessary data and assignments.
initialDataXML - XML data to be merged with the Layout template
mergeDataOnServer - False if we only need to render the Letter, without merging data with it. If False, the letter is also augmented with the FormBridge library for use in an interactive filling environment. True if data needs to be merged (in which case the FormBridge library is not included). If true, the PDF bytes are returned; if false, the bytes are not returned and the PDF is saved to a temporary location that so that it can be loaded from the client using a URL to the file name in the PDFResponseType.
useTestData - specify whether to use test data for rendering or not
renderInteractive - specify whether to render an interactive or flat PDF
Returns:
PDFResponseType that contains the PDFFile object
Throws:
Exception
ICCException

renderLetter

PDFResponseType renderLetter(String letterId,
                             String initialDataXML,
                             boolean mergeDataOnServer,
                             boolean useTestData,
                             boolean renderInteractive)
                             throws ICCException
Render the CTD against the given data XML. If there is a need to simply render the Letter without merging data with it, *mergeData* should be set to false.

Parameters:
letterId - ID of the Letter/CT to be rendered
initialDataXML - XML data to be merged with the Layout template
mergeDataOnServer - False if we only need to render the Letter, without merging data with it. If False, the letter is also augmented with the FormBridge library for use in an interactive filling environment. True if data needs to be merged (in which case the FormBridge library is not included). If true, the PDF bytes are returned; if false, the bytes are not returned and the PDF is saved to a temporary location that so that it can be loaded from the client using a URL to the file name in the PDFResponseType.
useTestData - specify whether to use test data for rendering or not
renderInteractive - specify whether to render an interactive or flat PDF
Returns:
PDFResponseType that contains the PDFFile object
Throws:
Exception
ICCException

renderLetter

PDFResponseType renderLetter(Letter letter,
                             String initialDataXML,
                             boolean mergeDataOnServer,
                             boolean useTestData,
                             boolean renderInteractive,
                             boolean saveToFile)
                             throws ICCException
Render the CTD against the given data XML.

Parameters:
letter - Correspondence Template to be rendered -- must be the *full* letter object containing all necessary data and assignments.
initialDataXML - XML data to be merged with the Layout template
mergeDataOnServer - False if we only need to render the Letter, without merging data with it. If False, the letter is also augmented with the FormBridge library for use in an interactive filling environment. True if data needs to be merged (in which case the FormBridge library is not included).
useTestData - specify whether to use test data for rendering or not
renderInteractive - specify whether to render an interactive or flat PDF
saveToFile - true to have the PDF saved to a temporary file for retrieval via URL from the client; false to have the PDF bytes returned in the PDFResponseType response.
Returns:
PDFResponseType that contains the PDFFile object
Throws:
Exception
ICCException

renderLetter

PDFResponseType renderLetter(String letterId,
                             String initialDataXML,
                             boolean mergeDataOnServer,
                             boolean useTestData,
                             boolean renderInteractive,
                             boolean saveToFile)
                             throws ICCException
Render the CTD against the given data XML.

Parameters:
letterId - ID of the Letter/CT to be rendered
initialDataXML - XML data to be merged with the Layout template
mergeDataOnServer - False if we only need to render the Letter, without merging data with it. If False, the letter is also augmented with the FormBridge library for use in an interactive filling environment. True if data needs to be merged (in which case the FormBridge library is not included).
useTestData - specify whether to use test data for rendering or not
renderInteractive - specify whether to render an interactive or flat PDF
saveToFile - true to have the PDF saved to a temporary file for retrieval via URL from the client; false to have the PDF bytes returned in the PDFResponseType response.
Returns:
PDFResponseType that contains the PDFFile object
Throws:
Exception
ICCException

renderLetter

byte[] renderLetter(String letterId,
                    String dataXML,
                    boolean renderInteractive)
                    throws ICCException
Render the given Letter, identified by the letter ID, against the given data XML. This would return a flat PDF file, with data populated per the data XML provided. Note 1: The data XML in such cases is a must. Note 2: This API is not intended to be called from an ActionScript client due to the byte[] return type. ActionScript clients should use the alternate APIs which can save the PDF to a temporary file so that the client can access it via a URL.

Parameters:
letterId - ID of the Letter/CT for which the PDF has to be generated
dataXML - XML data to be merged with the Layout template
renderInteractive - specify whether to render an interactive or flat PDF
Returns:
flattened PDF bytes
Throws:
Exception
ICCException

renderLetter

byte[] renderLetter(Letter letter,
                    String dataXML,
                    boolean renderInteractive)
                    throws ICCException
Render the given Letter object against the given data XML. This would return a flat PDF file, with data populated per the data XML provided. Note 1: The data XML in such cases is a must. Note 2: This API is not intended to be called from an ActionScript client due to the byte[] return type. ActionScript clients should use the alternate APIs which can save the PDF to a temporary file so that the client can access it via a URL.

Parameters:
letter - The Letter object for which the PDF has to be generated
dataXML - XML data to be merged with the Layout template
renderInteractive - specify whether to render an interactive or flat PDF
Returns:
flattened PDF bytes
Throws:
Exception
ICCException

processLetter

Map processLetter(Letter letter,
                  String initialDataXML,
                  boolean useTestData)
                  throws ICCException
Process the given Letter object, preparing the augmented layout template and final XML data that can be merged together in the desired render format.

Parameters:
letter - The Letter object which is to be processed.
initialDataXML - Initial XML data that is used to initialize the associated Data Dictionary (if any), and also augmented and merged with the Letter's layout template.
useTestData - specify whether to use the Letter's test data as initial XML data or not.
Returns:
A result Map that contains the augmented layout template and the final XML data.

The Layout template can be fetched by the key 'layoutTemplate', with the value being a byte array (byte[]).
The XML data can be fetched by the key 'xmlData', with the value being a byte array (byte[]).
Throws:
ICCException

processLetter

Map processLetter(String letterId,
                  String initialDataXML,
                  boolean useTestData)
                  throws ICCException
Process the Letter identified by the given Letter ID, preparing the augmented layout template and final XML data that can be merged together in the desired render format.

Parameters:
letterId - ID of the Letter which is to be processed.
initialDataXML - Initial XML data that is used to initialize the associated Data Dictionary (if any), and also augmented and merged with the Letter's layout template.
useTestData - specify whether to use the Letter's test data as initial XML data or not.
Returns:
A result Map that contains the augmented layout template and the final XML data.

The Layout template can be fetched by the key 'layoutTemplate', with the value being a byte array (byte[]).
The XML data can be fetched by the key 'xmlData', with the value being a byte array (byte[]).
Throws:
ICCException


[an error occurred while processing this directive] [an error occurred while processing this directive]