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")
ltpindia
Member
91 Points
70 Posts
local fonts not appearing in pdf.
Jan 23, 2012 10:24 AM|LINK
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:
any help on this
Mikesdotnett...
All-Star
154901 Points
19864 Posts
Moderator
MVP
Re: local fonts not appearing in pdf.
Jan 23, 2012 01:24 PM|LINK
The font must be installed on the server.
Beginning ASP.NET Web Pages with WebMatrix | My Site | Twitter