Search code examples
itextgenexus

Using iText and C# app, in WS 2012 R2, 64 Bits, I got this error, why?


I'm developing an app with Genexus, that uses iText to render PDF.

And I get this error on Windows Server 2012, 64 bits.

iTextSharp.text.DocumentException:C:\Windows\Fonts\BAR25IFH.TTF cannot be embedded due to license restrictions.

Same program on WS2003, 32bits , works fine.!

Best Regards


Solution

  • you should embed this font to your report, genexus has this property to be set on PDFREPORT.INI file, like this

    [Fonts Location (Sun)] Microsoft Sans Serif= c:\windows\fonts\micross.ttf

    have a look at this link

    http://wiki.genexus.com/commwiki/servlet/wiki?27500,PDFReport.ini+file+format,

    by default it doesn't embed fonts, you may already have this property set, if yes you can try to disable this property, so this error should disappear.