locked
local fonts not appearing in pdf. RRS feed

  • Question

  • User1716674006 posted

    Hi

    I have a web application, where in create a PDF document, using itextsharp and try to insert 'kannada' letters using 'TUNGA' font into it. But the application does not give any results.

    my code:

    Dim doc As Document = New Document

    Dim bfTimes As BaseFont = BaseFont.CreateFont("c:\windows\fonts\tunga.ttf", BaseFont.CP1252, False)
    Dim times As New Font(bfTimes, 12, Font.ITALIC, Color.RED)
    FontFactory.Register("c:\windows\fonts\tunga.ttf")

    PdfWriter.GetInstance(doc, New FileStream(Request.PhysicalApplicationPath + "\1.pdf", FileMode.Create))
    doc.Open()
    doc.Add(New Paragraph("ಕನ್ನಡ ನಮ್ಮ ನಾಡಿನ ", times))
    doc.Close()
    Response.Redirect("~/1.pdf")

    any help on this

    Monday, January 23, 2012 6:24 AM

Answers

  • User-821857111 posted

    The font must be installed on the server.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, January 23, 2012 9:24 AM