在ABCpdf符号字体 [英] Symbol font on ABCpdf

查看:205
本文介绍了在ABCpdf符号字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是ABCpdf.net组件的HTML转换为PDF。一些的HTML使用符号字体显示某些字符。不幸的是,我们正在消耗从第三方的HTML中,并且它不能被改变。

I'm using the ABCpdf.net component to convert HTML to PDF. Some of the HTML uses the Symbol font to display certain characters. Unfortunately, we are consuming the HTML from a third-party, and it cannot be changed.

我的开发环境中正确显示字体,但我的生产环境不会。它充当虽然未安装的字体,即使它是。如果我呈现在Internet Explorer相同的HTML对生产环境,它显示就好了。

My development environment displays the font correctly, but my production environment will not. It acts as though the font is not installed, even though it is. If I render the same HTML in Internet Explorer on the production environment, it displays just fine.

我曾尝试嵌入字体作为.eot,并在标题中提供的@ font-脸风格。我一直在使用TheDoc.AddFont('符号')尝试。有什么建议?

I have tried embedding the font as an .eot and providing a @font-face style in the header. I have tried using TheDoc.AddFont('Symbol'). Any suggestions?

产品:ABCpdf .NET 7 64

Product: ABCpdf .NET 7 x64

生产操作系统:Windows Server 2003 x64上,IE8

Production OS: Windows Server 2003 x64, IE8

开发OS:Win7的X64,IE8

Development OS: Win7 x64, IE8

推荐答案

虽然我说Doc.HtmlOptions就是答案,原来,这是别的东西完全。这些符号没有出现因为字体重量是不正常的(即,它是粗体)。没有包含这些字符没有大胆的子集。 IE浏览器是足够聪明,忽视了大胆的一部分,但PDF是相当挑剔的。它找不到字符,所以它只是说明不了什么。

Although I said that the Doc.HtmlOptions was the answer, it turned out that it was something else entirely. The symbols did not show up because the font-weight was not normal (i.e., it was bold). There is no bold subset that contains these characters. IE is smart enough to ignore the bold part, but PDF is rather finicky. It cannot find the character, so it just shows nothing.

真正的解决办法是通过HTML梳理,并确保所有的符号被一个跨度字体重量包围:正常重要。它可能是一个不太完美的解决方案,但它是有效的。仍然随机不肯露面的唯一符号是象征角度(&放大器; ANG; )。对于这一点,我用图像代替它。我还是想不通,为什么就不会出现了。

The real solution was to comb through the HTML and ensure that all symbols were surrounded by a span with font-weight: normal !important. It is perhaps a less elegant solution, but it is effective. The only symbol that still randomly refused to show up is the angle symbol (∠). For this, I replaced it with an image. I still can't figure out why it won't appear.

这篇关于在ABCpdf符号字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆