RTF Support
We believe that support of RTF (Rich Text Format) is very important. But let's be clear that DocOrigin support of RTF is limited. What is there is amazingly useful, covering of most things that a typical business form needs. For the most part, it is used for Terms & Conditions text, which is usually fairly bland, requiring only bolding, possibly italicization, and font size and typeface changes. The selected typeface must be included in the current output configuration (.prt
). DocOrigin supports all of that, but not a lot more.
We do support superscript, subscript, and basic underlining as well as color changes within the text paragraph.
We do preserve tab characters and support a basic set of tab stops, which happen to default to 1/2", so an embedded tab will sort of work. If we encounter the start of a paragraph in the RTF, we interpret that as leaving a blank line and then starting at the left margin. If already at the start-of-line, the same except no blank line is added.
That's all. DocOrigin is not a word processor and doesn't profess to be one. We recognize only that RTF that fits nicely into our existing business form text capabilities. See the chapter below for a more detailed list of limitations.
The limited tab support often tricks people into believing we have support for RTF-defined lists. We do not. Some system engineers have worked out ways to accomplish this feat but it is not through direct usage of an rtf-defined list.
As of 3.1.002.06, it's possible to enable parsing of paragraph formatting commands. See -rtfParserVersion. Supported are per paragraph indentation, tab positions, alignment, and space before/after.
DocOrigin Merge strives to and seems to succeed in ignoring all of the RTF syntaxes that it doesn't understand. But you would be well advised to keep your RTF to a much more reasonable subset. For example, at worst, use Wordpad, not Microsoft Word to edit your RTF. The bloat that is in MS Word is unbelievable. This generally makes it impossible to find your actual text or to do any debugging since the RTF string lengths will be huge and unmanageable. KEEP IT SIMPLE.
DocOrigin supports rich text format directly in text objects through the use of the Common Properties Tab. In addition, rich text formatting is retained from your clipboard when copied from other files such as PDFs, Word documents, and other DocOrigin files. Lastly, external rich text files (RTF) can be directly imported into a DocOrigin file (see chapter below).
Note that it's a good idea to resave your rtf fragments in Wordpad before using it in DocOrigin. This will significantly simplify the RTF structure and make it possible to parse with not sophisticated RTF parsers.
Like all textual data fields, RTF text fields support square-bracketed references to field names, in the style [fieldname].
But such a string cannot have any RTF syntax within it. Don't bold the field name in your RTF editor, or make any such rich text changes. It must be literal. Your very best course of action is to open your RTF in a plain text editor and verify that your [fieldName] reference is intact. Looking at your RTF in a plain text editor will be instructive and will surely lead you away from RTF editors that inject so much extra syntax.
Limitations
Supported Rich Text Features:
The following features of rich text formatting are supported:
- Color
- Font | The available fonts are defined by the Printer Configuration File selected for the document as well as the fonts installed and the DocOrigin Design Machine and Server.
- Bold
- Italic
- Single Underline
- Point Size
- Strikethrough
- Subscript
- Superscript
- Paragraph Formatting:
- Line Spacing
- Paragraph Space Before and After
- Hanging Indent
- First Line Indent
- Tabs
Note: Paragraph formatting applies to the entire text object. Meaning, you cannot have a regular paragraph, followed by an indented paragraph with hanging indents.
Unsupported Rich Text Features:
- No Tables
- No Images
- Bullets
- Outlines
- Numbering
Importing Rich Text Files
When importing external rich text files into a text or field object, the paragraph formatting is defined in the DocOrigin object, such as line spacing and tab stops. Therefore, if you want .25” tabs, define the Tab setting in the DocOrigin object that the RTF is being imported into and simply insert a literal tab in the RTF file. The syntax for importing the external RTF file is [@path/filename.rtf].
The auto-bullets and the auto-numbering feature is coming shortly. In the meantime, these features can be accomplished using the desired character and hanging indents. Be sure they define the same value for the Hanging Indent and Tab stop. Using the Character Map application is useful for capturing the desired character(s).
See Also
-rtfParserVersion
Merge External PDFs