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.

Unicode characters issue

Thread ID:

Created:

Updated:

Platform:

Replies:

63455 Jul 4,2007 07:13 AM May 13,2008 03:42 AM Windows Forms 8
loading
Tags: PDF
Miran Vulic
Asked On July 4, 2007 07:13 AM

Hi,
I have a problem when publishing table that contains non-standard character such as ćčšž etc. into a PDF document
using table.Publish(tableLocation, pdfDoc.LastPage)
(used from your example)

i get an exception:
Could not find width for this character. Unicode is not currenty supported by system fonts.

Thanks

Melba Winshia [Syncfusion]
Replied On July 4, 2007 08:19 AM

Hi Miran,

I created a sample to publish table that contains non-standard character such as ćčšž into a PDF document. But I was not able to reproduce the exception. Here is the test sample that I used to test this issue:

http://websamples.syncfusion.com/samples/XlsIO.Windows/63455/main.htm

Could you please take a look at the sample above and let me know if you still find any problem while running the sample? If not could you please modify this sample so that I can reproduce the issue. It would help me in analyzing this issue further.

Thanks,
Melba


Administrator [Syncfusion]
Replied On May 7, 2008 11:41 AM

Hi,
we are facing the same issue.
I think this related to our Synchfusion version that currently is 3.301.0.0.
Unfortunately we cannot switch to latest one because it require MS .net framework 2.0. that is not supported by the release of our software were we face the issue.
Do you know if any of synchfusion version running on MS .net framework 1.1 support UTF8 characters?
Thanks
Paolo

>Hi Miran,

I created a sample to publish table that contains non-standard character such as ćčšž into a PDF document. But I was not able to reproduce the exception. Here is the test sample that I used to test this issue:

http://websamples.syncfusion.com/samples/XlsIO.Windows/63455/main.htm

Could you please take a look at the sample above and let me know if you still find any problem while running the sample? If not could you please modify this sample so that I can reproduce the issue. It would help me in analyzing this issue further.

Thanks,
Melba





SyncfusionUTF8 error.zip

Administrator [Syncfusion]
Replied On May 11, 2008 10:46 PM

hello,everyone,
I am facing the same issue.I want to create a pdf and print a chinese string "你好",but it print "ÄãºÃ!" for me!
who can tell me how to do with the issue?

any help will be appreciate.


Jerry



Yavanaarasi G [Syncfusion]
Replied On May 12, 2008 07:04 AM

Hi Paolo,

I regret to let you know that we have stopped providing support for .Net framework version 1.1. We provide support only for version 2005 and 2008 . So please upgrade to .Net framework version 2.0 or higher version. I had run the sample link that was updated previously with version 3.3 with .Net framework 2.0. Here it works fine.

Please upgrade and try the above sample link and let me know if the issue still exists.

Regards,
G.Yavana


Yavanaarasi G [Syncfusion]
Replied On May 12, 2008 07:05 AM

Hi Jerry,

If you want to print the chinese strings you have to include the below code snippet and run the above sample. The chinese string is printed correctly.


[C#]
Font arabicFont = new Font("Times New Roman", 10);
IPDFFont chinesefont = pdfDoc.Fonts.Add(CJKFontFace.HanyangSystemsShinMyeongJoMedium);


Please try this and let me know if this helps.

Regards,
G.Yavana









Administrator [Syncfusion]
Replied On May 12, 2008 11:39 PM

G.Yavana,thanks for your help.I do what you tell me and find that PdfDocument class has not a property named Fonts,my code such as:

//Create a new document.
PdfDocument doc = new PdfDocument();

//Add a page
PdfPage page = doc.Pages.Add();

//Create Pdf graphics for the page
PdfGraphics g = page.Graphics;

//Create a solid brush
PdfBrush brush = new PdfSolidBrush(Color.Black);

float fontSize = 20f;

//Set the font
PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, fontSize);
//Font arabicFont = new Font("Times New Roman", 10);
//IPDFFont pdfNewFont = doc.Fonts.Add(CJKFontFace.HanyangSystemsShinMyeongJoMedium);
//Draw the text
g.DrawString("你好!", font, brush,new PointF(20,20));

doc.Save("Sample.pdf");


Administrator [Syncfusion]
Replied On May 13, 2008 03:18 AM

Hi G.Yavana

I have find out how to use the Fonts property,but there is one thing that I cannot understand:how to use the PDFDocument class and the PdfDocument class?I cannot find any helpful messages about them.

Any help will be appreciated.


Jerry


Yavanaarasi G [Syncfusion]
Replied On May 13, 2008 03:42 AM

Hi Jerry,

We have implemented our new PDF in version 5.2. In our new PDf the API's are different. The code that I send in the previous update was in the legacy version. You can create the cjkfont in our new pdf by using the below code snippet:

//Set the font

PdfCjkStandardFont font1 = new PdfCjkStandardFont( PdfCjkFontFamily.SinoTypeSongLight ,20f);

//ChineseTraditionalFont
PdfCjkStandardFont font2 = new PdfCjkStandardFont(PdfCjkFontFamily.MonotypeHeiMedium, 20.5f);

g.DrawString("你好!", font1, brush,new PointF(20,20));


Please refer the below link for more details about Unicode Support:

http://64.78.15.37:89/products/pdf/windows/codesamples/viewsource.aspx?&zip_path=1417_Unicode_support_src.zip&lang=csharp&id=1417


Please refer the documentation link for how to use the PdfDocument class:
http://www2.syncfusion.com/ug_62/pdf/default.html

Please try this and let me know if this helps.

Regards,
G.Yavana


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.

;