Products Downloads


French version


 


This function is provided when using Adelia Print Engine.

This function is used to execute the whole APE process by executing the Merge and Transform steps in sequence.

It takes the following as input:

  • A template: a text file (.ftlx extension) defining the data display and presentation rules,
  • A data source: a tree of objects encapsulating the data to display,
  • An output format (PDF, PS, PCL, PNG, etc.),

to produce an editable document as an output which can be printed by the peripherals supporting the output format.


The result document can be stored either in an IMAGE variable or in a URI (Uniform Resource Identifier).

In the latter case, the alphanumeric string representing the URI can be stored in an Adelia variable (it cannot be passed to this function as a literal).


Remember:

To identify the "c:\myDocument.pdf" file in the form of a URI, write file:///c:/myDocument.pdf 


NB: This function is the Adelia counterpart of the APE "mergeandtransform" Web service. 


Remember: the VaToolBx dll must already be loaded (LOAD_DLL  instruction) when this function is called and must remain loaded when the VaToolBxAPEClearDataModel, VaToolBxAPEMergeDoc, VaToolBxAPETransformDoc or VaToolBxAPEAddInDataModel functions are called. 


Application area

  • Java client,

  • Java server,

  • Adelia Web client,

  • Adelia Cloud client,

  • Event Adelia client.


Parameters

ALPHA(n)

NameSpaceName

Name of the namespace.

ALPHA(n)

TemplateName

Name of template to be processed.

ALPHA(n)

Locale

Name of locale (in IETF BCP 47 format) to be applied when searching for and processing the template.

ALPHA(n)

ModelName

Name of the data model used as a data source when processing the template.

ALPHA(n)

MimeType

Result document output format.

The string must be in the format defined by RFC 6838 (click here for more information).

ALPHA(n) or IMAGE

Options

Definition of options to apply during template processing and document transformation.

IMAGE or ALPHA(n)

MergeTransformDoc

When the parameter is an IMAGE-type variable, it will contain the result document of the APE's processing of the TemplateName template with the ModelName data source.

If the parameter is ALPHA(n) type, the result document is written in the URI specified in the alphanumerical variable.

NUM_BIN_2

ReturnCode

Operation return code:

0: Operation completed successfully. 

-1: The template name cannot be empty. 

-2: The data model name does not correspond to any previously created data models.

-3: Error when closing the document produced by the merge step.

-4: Error during syntax analysis in JSON format of "Options" processing options.

-5: Error during value analysis of "Options" processing options.

-6: Input/output error during analysis of "Options" processing options.

-7: The "Options" parameter must be ALPHA or IMAGE type.

-8: The "MergeTransformDoc" parameter must be ALPHA or IMAGE type.

-9: Error while processing the "MergeTransformDoc" parameter as a URI.

-10: Error when closing the "MergeTransformDoc" result document.



The errors described below relate to the FreeMarker processing of the template:

1: Error during "jsonPathConv" option processing for data conversion in the data source. 

2: Error when merging additional data into the FreeMarker result document. 

3: Error when searching for the template: requested template cannot be found.

4: The template name does not comply with the template name format used.

5: Error during template syntax analysis.

6: Input/output error when processing the template.

7: Error when executing template processing.

8: Error when processing the "jsonGenerator" option to generate the fake data source.

9: Internal error during FreeMarker template processing.

10: Error when formatting the document produced by the merge step.


The errors described below relate to the processing of the document produced by the merge step by the Apache FOP engine:

31: Apache FOP engine creation error. 

32: Document transformer creation error. 

33: Error when transforming the document produced by the merge step.

34: Input/output error when processing the result document.

35: Internal error when formatting the document produced by the engine's merge step. 




Namespace

This is a template group space.

Namespaces can be compared with folders: they behave in an identical way to a folder, there can be elements of the same name in different namespaces.

A namespace can also contain other namespaces.

Click here for more details.


Locale

This is used to specify the template to be looked up according to the information making up the locale (the language code, country or region code and variant).

Click here for more details.


Apache FOP engine output formats

This engine supports several output formats.


XSL-FO document transformation and template processing options

The "Options" parameter includes VaToolBxAPEMergeDoc and VaToolBxAPETransformDoc function options.
The options must be in JSON format.

This must be an object with each member describing the options of the two VaToolBxAPEMergeDoc functions, namely:

    • merge: groups VaToolBxAPEMergeDoc function options in an object,
    • transform: groups VaToolBxAPETransformDoc function options in an object.

See "options" section of "mergedoc" and "options" section in "transformxslfo".


For example

ALPHA(250) URI
NUM_BIN_2 returnCode

URI = 'file:///c:/bdcadel/detailarticle.pdf' CALL_DLL 'VaToolbx.dll' 'VaToolBxAPEMergeAndTransformDoc' 'stock/article' 'detailArticle.ftlx' 'fr' 'articleDataModel' 'application/pdf' *BLANK URI returnCode


↑ Top of page

  • Aucune étiquette