On this Page

    _inlineToRtf (Central "\x" to RTF)

    (As of 3.1.001.01)

    Converts Central inline formatting to RTF.

    Syntax

    _inlineToRtf(Central data with \x style inline commands)

    Parameters

    An Adobe (JetForm) Central data stream string.

    Returned Value

    That input string with inline commands is converted to RTF format.

    Description

    In Adobe (JetForm) Central, the data stream could include "inline commands" that could be used to style text, e.g. bold, underline, italicize. DocOrigin uses the official RTF syntax for such operations. This function strives to convert the "Central" syntax to the RTF way. This is used internally in the ConvertDatToXml filter but has been made available for usage in a script. This conversion handles:

    • \b1 and \b0 (bold)
    • \i1 and \i0 (italic)
    • \ul1 and \ul0 (underline)
    • \fs (font size)
    • \fn (font name)
    • \push (rtf { )
    • \pop (rtf } )
    • \li (indent -- all we manage is to insert a tab)
    • \f# (select font by number -- discarded since those numbers are not correlated to any typeface name)
    • \u+xxxx. (Unicode character) (as of 3.1.001.08)
    • \n - becomes a newline
    • Other \??? sequences are discarded, with efforts to detect Windows-style file names so that they are not discarded.

    The above handles very much the vast majority of text style inline commands. If you encounter others you will have to pre- or post-process the data.

    Example

     var rtf = _inlineToRtf("The \\b1.quick\\b0. fox...");

    See Also

    ConvertDatToXml Filter