HTML font formatting

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
Order By: Standard | Newest | Votes
jles posted this 05 December 2016


There was indeed a bug in Docentric Toolkit and it has been already fixed. Please contact our "support at" 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