【发布时间】:2013-08-30 20:54:03
【问题描述】:
我的 C# 应用程序中有一些 RTF 文本,我将其转换为 HTML,然后发送到我的 PHP 文件。 问题是;我在 PHP 中的所有文本都是 Arial,我的 RTF 的输出是 Tahoma。有什么想法可以更改字体系列吗?
这是我目前的代码:
string memoValue = inboundSet.Fields["MEMO"].Value.ToString();
if (RtfTags.IsRtfContent(memoValue))
{
using (RichEditDocumentServer richServer = new RichEditDocumentServer())
{
string htmlText = string.Empty;
richServer.RtfText = memoValue;
htmlText = richServer.HtmlText;
callDetail.Memo = htmlText;
}
}
else
{
callDetail.Memo = memoValue;
}
在我的 PHP 文件中,我以这种方式获取值:
echo "<td>Memo:</td><td>".$value->Memo."</td>";
我也是这样尝试的:
echo "<td>Memo:</td><td class='fonttest'>".$value->Memo."</td>";
在我的 CSS 中:
.fonttest
{
font-size:12px;
font-family:Arial;
}
我的文字一直是这样的:
这是我的 RTF 文本的样子:
【问题讨论】:
-
您是否尝试将
Times New Roman和Calibri更改为Arial?只是我需要问的一个简单的事情:) -
我已经解决了。我无法手动更改 RTF,因为我无法直接访问 C# 应用程序的代码