Hello!
We try to import HTML Source Code, and export it to OpenXml.
The problem is, that the highlighting - color of the Runs (RunProperties) does not match with the HTML-highlighting-colors.
The HTML string is for example:
<
p
style
=
"margin-top: 0px;margin-bottom: 0px;line-height: 1.15;"
><
span
style
=
"font-family: 'Verdana';font-size: 16px;background-color: #F79646;"
>Test</
span
><
span
style
=
"font-family: 'Verdana';font-size: 16px;"
></
span
></
p
>
The WordProcessing - Code:
HtmlFormatProvider cHtmlFormatProvider =
new
HtmlFormatProvider();
RadDocument cDocument = cHtmlFormatProvider.Import(sHtmlString);
DocxFormatProvider cDocxFormatProvider =
new
DocxFormatProvider();
using
(var fileStream =
new
MemoryStream())
{
cProvider.Export(cDocument, fileStream);
using
(WordprocessingDocument wp = WordprocessingDocument.Open(fileStream,
true
))
{
//Paragraphs and runs etc...
}
}
But if i check the RunProperties of the Run (of the Paragraph), i see that the highlighting color is 'yellow' but it should be #F79646 (Orange).
There is no other possibility for us, we have to export it to HTML.
The Html Source Code was produced by RadRichTextBox.
Please help us.
Thank you.