Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
105
Font not embedding in PDF published document
posted

I have two barcode (3 of 9) fonts that I am testing in a ASP.Net application.  One works well when I set a IText object's font.name property to it, the second does not give me an error, it just does not show in the document.  Here is the code:

Dim rpt As Infragistics.Documents.Report.Report = New Infragistics.Documents.Report.Report()
Dim sct As Infragistics.Documents.Report.Section.ISection = rpt.AddSection()
Dim tx As Infragistics.Documents.Report.Text.IText

tx = sct.AddText()
tx.Style.Font.Name = "Code39_Barcode"
tx.Style.Font.Size = 48
tx.Style.Font.Preferences.Embed = True
tx.AddContent("*9288373*")
Response.ContentType = "application/pdf"
rpt.Publish(Response.OutputStream, Report.FileFormat.PDF)

I noticed that the font that works in embedded in the resulting PDF document whereas the one that does not work is not embedded.

 

Thanks for any help that you can provide

Ali

 

  • 37774
    posted

    I believe that there are only a certain number of fonts that work by default with the Acrobat reader, and most likely it's true that none of these are the barcode fonts.  I think that many fonts, in general, need to be embedded into the document in order to work correctly, especially Unicode or non-standard fonts.  It may be that if the fonts are in installed on the system itself, they can be read, but I am not certain.

    -Matt