public static HtmlResult RtfToHtml(string rtf, string contentUriPrefix = null, bool asFullDocument = true)
        {
            var xamlStream    = RtfToXamlConverter.RtfToXamlPackage(rtf);
            var htmlConverter = new XamlToHtmlConverter
            {
                AsFullDocument   = asFullDocument,
                ContentUriPrefix = contentUriPrefix
            };

            return(htmlConverter.ConvertXamlToHtml(xamlStream));
        }
Beispiel #2
0
        /// <summary>
        /// Parses the given flow document by creating the corresponding html data as well as the html document.
        /// </summary>
        /// <param name="document">Flow document to parse</param>
        /// <param name="conversionResult">Conversion result to store error and warning messages.</param>
        private void ParseFlowDocument(FlowDocument document, Tum.PDE.ToolFramework.Modeling.ValidationResult conversionResult)
        {
            if (document == null)
            {
                return;
            }

            string html = XamlToHtmlConverter.ConvertXamlToHtml(document, conversionResult);

            this.htmlData = html;
            ParseHtml(conversionResult);
        }