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.
Unfortunately, activation email could not send to your email. Please try again.

Problem with Greek fonts...

Thread ID:

Created:

Updated:

Platform:

Replies:

43829 May 4,2006 02:34 PM May 5,2006 03:20 AM Windows Forms 1
loading
Tags: PDF
Sotiris Spanos
Asked On May 4, 2006 02:34 PM

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 03:20 AM

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.

CONFIRMATION

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.

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.

;