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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Problem with Greek fonts...

Thread ID:





43829 May 4,2006 06:34 PM UTC May 5,2006 07:20 AM UTC WinForms 1
Tags: PDF
Sotiris Spanos
Asked On May 4, 2006 06:34 PM UTC

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

Ajish [Syncfusion]
Replied On 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.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon