HTML font formatting

0
AxaMatrix posted this 01 December 2016

We need some help with this matter. I am using this code to try to enforce Arial font in my subdocument HTML.

public static Byte[] ToHtml(String text)
    {
        Byte[] bytes = null;
        String html = String.Format("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\"><html><head><title></title></head><body style="\"font-family:" arial;="" font-size:="" 10pt;\"="">{0}</body></html>", !String.IsNullOrEmpty(text) ? text : String.Empty);

        bytes = Encoding.ASCII.GetBytes(html);

        return bytes;
    }

So far, when the report is finished, the HTML parts are using the default Calbri font. Could you provide some insight into what we're doing wrong here?

11 Posts
12 Points
1 Comments
Order By: Standard | Newest | Votes
0
jles posted this 05 December 2016

Hi,

There was indeed a bug in Docentric Toolkit and it has been already fixed. Please contact our "support at docentric.com" to get the download link for the newest version 5.0.

Thanks, Jure Leskovec

119 Posts
246 Points

Our 30754 members have posted 271 times in 80 discussions