Greetings.
Imported the following HTML into the DPL.
<
style
type
=
"text/css"
>
p {
font-family: Calibri;
font-size: 14.6666666666667px;
margin-top: 0px;
margin-bottom: 0px;
line-height: 115%;
}
.TelerikNormal {
font-family: Calibri;
font-size: 14.6666666666667px;
margin-top: 0px;
margin-bottom: 0px;
}
.TelerikHeading1 {
font-family: Cambria;
font-size: 28px;
font-weight: bold;
color: #4F81BD;
margin-top: 18.6666666666667px;
margin-bottom: 18.6666666666667px;
}
.TelerikHeading2 {
font-family: Cambria;
font-size: 20px;
font-weight: bold;
color: #4F81BD;
margin-top: 18.6666666666667px;
margin-bottom: 5px;
}
</
style
>
<
h1
class
=
"TelerikHeading1"
>
<
span
>Study Results</
span
>
</
h1
>
<
h2
class
=
"TelerikHeading2"
>Issue 1</
h2
>
<
p
>This is the issue</
p
>
Then we export using the following settings in order to include the HTML in an email:
HtmlExportSettings exportSettings =
new
HtmlExportSettings()
{
DocumentExportLevel = DocumentExportLevel.Fragment,
ImagesExportMode = ImagesExportMode.External,
ImagesFolderPath = @
"C:\Temp\TestImages"
,
ImagesSourceBasePath =
"cid:"
,
StylesExportMode = StylesExportMode.Inline
};
htmlFormatProvider.ExportSettings = exportSettings;
string
body = htmlFormatProvider.Export(outputDocument);
The resulting HTML replaces the <h1> and <h2> tags as expected, but it looks like only the color from the assigned classes is being used. The rest of the styles appear to come from the <p> style.
Is there a workaround for this?