Because of the complexity of RTF templates is decided to work just with MS-Word templates with HTML layout in the future.
Method for conversion
The easiest way to convert the RTF file to HTML format is as follows:
Open the RTF file
Save the RTF file as a Web Page (*.html)
Open the saved file in a (plain) text editor
Change the following values:
- > by >
- < by <
- " by "
- <meta http-equiv=Content-Type content="text/html; charset=windows-1252"> by <cx:let name="ct" value="$response" invoke="headerForKey:" arg0="content-type"><meta http-equiv="Content-Type" content="<cx:write value="$ct"/>"></cx:let>
- <img src=
Most of the time this does not work because this links to local files. To make this work, make sure that the location of the image is available from the web.
Rename the extension to .doc
Test the document
It is very important to check if the template actually works. MS-Word sometimes has the characteristic to mess up the CxScript codes. You can see this if there are any unwanted empty lines.
A solution is:
Remove the unwanted paragraphs
Don't save the page as a Web Page, but save it as a Web Page, Filtered and check if it gives the desired output.
If the output has sequences like "AAAAAAAA", than it can help to save the file again as Web Page after you've saved the page as Web Page, Filtered. Afterwards you need to rename the file to a *.doc obviously.
As concluded from the example above, converting a RTF template to HTML format is not always as simple. As guidance, the more detailed a document is, the more time converting the document will cost.
Keywords : UD-1846