Character font on ABCpdf

I am 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 HTML from a third-party manufacturer and cannot be changed.

My development environment displays the font correctly, but my production environment will not. It acts as if the font is not installed, although it is. If I create the same HTML code in Internet Explorer in a production environment, it will display just fine.

I tried to embed a font like .eot and provide the @ font-face style in the header. I tried using TheDoc.AddFont ('Symbol'). Any suggestions?

Product: ABCpdf.NET 7 x64

Production OS: Windows Server 2003 x64, IE8

OS for development: Win7 x64, IE8

+5
source share
3 answers

Although I said that Doc.HtmlOptions was the answer, it turned out that it was completely different. Characters were not displayed because the font weight was not normal (i.e., it was bold ). There is no bold subset containing these characters. IE is smart enough to ignore the highlighted part, but the PDF is pretty sophisticated. He cannot find the character, so he simply does not show anything.

, HTML , span font-weight: normal !important. , , , . , , (∠). . , .

+2

WebSuperGoo : HtmlOptions, . . !

If you want to embed the fonts used in a web page/HTML you need to use:
    Doc.HtmlOptions.FontEmbed = True
You may also need to set
    Doc.HtmlOptions.FontSubstitute = False
and possibly:
    Doc.HtmlOptions.FontProtection = False
before you use the Doc.AddImageUrl or Doc.AddImageHtml methods.

: , , , FontProtection = false.

+6

.

I had a similar problem with fonts in ABCPdf. Although the fonts were clearly installed, for some reason ABDPdf did not select them until the machine rebooted.

It may be some kind of non-restarting way to achieve the same thing, but this will entail an understanding of the problem! If it's easy, just try restarting.

+2
source

All Articles