Systemite provides API functionality for converting RVF to other formats such as plain text, RTF, DOCX and vice versa. Our goal is to keep this conversion functionality as stable as possible. However, to maintain and improve the quality of our product, this functionality needs to be updated from time to time. This means that Systemite cannot guarantee that the result of the conversion functionality is identical on the format level from one release to another. The source RVF data, however, is never affected.


Below are a number of examples for how to convert from and to different formats.


Convert Plain Text and Assign to Item Description

item.Description = SWDescription.PlainTextToDescription("Convert me");


Convert RTF Formatted Text and Assign to Item Description

string rtf = @"{\rtf1\fbidis\ansi\ansicpg0\uc0\deff0\deflang0\deflangfe0{\fonttbl{\f0\fnil arial;}}{\colortbl;\red0\green0\blue0;}\n\pard\fi0\li0\ql\ri0\sb0\sa0\itap0 \plain \f0\fs20\cf1 Convert me\par}";

item.Description = SWDescription.RtfToDescription(rtf);


Convert html and Assign to Item Description

item.Description = SWDescription.MakeDescription(SWUtility.HtmlToRvfz("C:\\Temp\\Convert.html", "Arial"));


Convert Description to Plain Text

string descriptionPlain = SWDescription.DescriptionToPlainText(item.Description, SWConnection.Instance.Broker);


Convert Description to RTF

string descriptionRtf = SWDescription.DescriptionToRtf(item.Description, SWConnection.Instance.Broker);


Convert Description to Docx and Save to Disc

SWDescription.SaveToDocX(item.Description, SWConnection.Instance.Broker, "C:\\Temp\\ExampleDoc.docx");


Convert Description to Docx and Load to Memory Stream

byte[] docxAsByteArray = SWDescription.DescriptionToDocX(item.Description, SWConnection.Instance.Broker);

MemoryStream input = new MemoryStream(docxAsByteArray);
// Do something...