Customizing document details

For some transforms, values that are returned from ODWEK might not be consistent with the command line values that are expected by the transform.

About this task

For example, a transform might have a fixed set of options to specify a carriage control type. The values returned by ODWEK when the <CARRIAGECONTROL> tag is included in the <CmdParms> are 'A' (ANSI), 'M' (Machine), and 'N' (None). Recall that the command that is produced by the XML shown in the example XML for the Basic Implementation is:

c:/opt/mytransform/bin/txfrm.exe -lm 133 –x A –a 500 –o <outputfilename> -r PDF <datafilename>

Because the <CARRIAGECONTROL> tag is present, ODWEK returns the document’s corresponding value: "-x A", or "-x M", or "-x N" depending on the CC Type defined in this document’s application definition. If the transform expects a different set of acceptable values for the carriage control specification, such as 2, 4, and 0, then mapping those values can be accomplished by substituting the following XML:

<Transforms>
   <transform>
    <TransformName>MyTXFRM_EXE</TransformName>
    <TransformDescription>Transform Cmdline Executable</TransformDescription>
    <ODFileType>L</ODFileType>
    <OutputMimeType>application/pdf</OutputMimeType>
    <OutputExtension>pdf</OutputExtension>
    <CmdParms>
        <RECORDLENGTH>-lm</RECORDLENGTH>
        <CCANSI>-x 2</CCANSI>
        <CCMACHINE>-x 4</CCMACHINE>
        <CCNONE>-x 0</CCNONE>
        <CODEPAGE>-a</CODEPAGE>
        <OUTPUTFILE>-o</OUTPUTFILE>
    </CmdParms>
    <CmdLineExe>/opt/mytransform/bin/txfrm.exe</CmdLineExe>
    <Passthru>
     <!-- Use tag cmdlineparm to declare additional cmdline variables that the transform might require -->
        <cmdlineparm>-r PDF</cmdlineparm>
    </Passthru>
  </transform>
<Transforms>