文字的背景色

用户名

如果addhtml使用方法,如何设置文本的背景色由于添加HTML方法仅支持许多HTML标签,因此没有任何解决方法。这就是我所做的

theDoc.Rect.String = "35 725 560 765";//35 745 560 765
                int theFont1 = theDoc.AddFont("Arial", LanguageType.Latin, false);
                theDoc.FontSize = 14;
                theID = theDoc.AddHtml("<p align='center'><font pid=" + theFont1.ToString() + " font-weight='bold'>" + doc_ref + " - " + doc_name + "</font></p>");
罗斯·普纳德

如果确实需要全功能的HTML,则需要使用AddImageURL或AddImageHTML,它们可以利用Internet Explorer HTML引擎或Gecko引擎。不幸的是,它们仅限于系统安装的字体和RGB颜色-您不能使用文件系统参考来添加字体,也不能使用CMYK或专色。

对于设置背景颜色的特定问题,请首先添加一个彩色矩形,然后添加文本:

theDoc.Rect.String = "35 725 560 765";//35 745 560 765
theDoc.Color.String = "0 100 100 0"; // 100% Magenta + 100% Yellow = CMYK red for background
int bgID = theDoc.fillRect();

theDoc.Color.String = "0 0 0 100"; // black text
int theFont1 = theDoc.AddFont("Arial", LanguageType.Latin, false);
theDoc.FontSize = 14;
int textID = theDoc.AddHtml("<p align='center'><font pid=" + theFont1.ToString()
    + " font-weight='bold'>" + doc_ref + " - " + doc_name + "</font></p>");

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章