We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Problem with Greek fonts...

Dear Sirs, We are evaluating Essential PDF and came up with a problem. When we use the following script in VB.NET 2003 we are able to draw Greek characters correctly in a PDF document: Dim font1 As IPDFFont = pdfDoc.Fonts.Add("C:\WINDOWS\Fonts\arial.ttf") font1.Size = 10 pdfDoc.LastPage.Graphics.DrawText(pointToDraw, strText, font1) pdfDoc.Save(strTargetFile) ...but we will have to know (during runtime) the exact font path of "arial.ttf". If we use the following script, which doesn''t require the exact font path, we cannot draw Greek fonts (instead we get unrecognizable characters) : Dim myFont1 As Font myFont1 = New Font("Arial", 10, FontStyle.Regular) Dim font1 As IPDFFont = pdfDoc.Fonts.Add(myFont1) pdfDoc.LastPage.Graphics.DrawText(pointToDraw, strText, font1) pdfDoc.Save(strTargetFile) How can we draw Greek text without requiring to know the exact path of the fonts? Regards, sspan

1 Reply

AJ Ajish Syncfusion Team May 5, 2006 07:20 AM UTC

Hi sspan, The issue that you are facing is due to the font that is not being embedded. In general an Acrobat Viewer completes a series of steps to retrieve font information when opening a PDF file. It first checks the PDF file for font information, such as embedded or subset fonts, and if available will use that font information for display and printing. If there is no font information in the PDF file, then Viewer will temporarily substitute the font. Please try using the following peace of code Dim myFont1 As font = New font("Arial", 10, FontStyle.Regular) Dim font As IPDFFont = pdfDoc.Fonts.Add(myFont1, True) I think this would help you to resolve the problem. Also here is a sample that inserts Greek text into pdf document: FontIssue.zip Please let me know if you need any further assistance. Thanks, Ajish.

Loader.
Live Chat Icon For mobile
Up arrow icon