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

Turkish Character Problem

Thread ID:

Created:

Updated:

Platform:

Replies:

115863 Feb 14,2014 08:15 AM UTC Mar 13,2014 11:45 AM UTC WinRT 7
loading
Tags: PDF
Ali Uslu
Asked On February 14, 2014 08:15 AM UTC

Hi, I am using Pdf controller . I can design pdf how I want it. However , Turkish characters are not displayed in the pdf document. How can I solve this problem ? 

George Livingston [Syncfusion]
Replied On February 19, 2014 12:45 PM UTC

Hi Ali Uslu,

Thank you for using Syncfusion product.

We are not able to reproduce the issue, please find the sample available in the link below with which we tried to reproduce the issue. Please provide us a sample or modified the sample to reproduce the issue it would be more helpful for us to investigate on this forum.

Please let us know if you need any further assistance.

Regards,
George

Attachment: DrawTurkishTextSample_9dccfbe3.zip

Ali Uslu
Replied On February 27, 2014 03:27 PM UTC

Okay. Now I am showing , how my code is working and how it is not able to print Turkish characters , step by step.

-->This is a part of my code that constructs the pdf page  ; 

            txtElement = new PdfTextElement("TC KİMLİK/VERGİ SİCİL");                // here I  want to write TC KİMLİK/VERGİ SİCİL
            txtElement.Font = new PdfStandardFont(PdfFontFamily.TimesRoman, 20);
            txtElement.Draw(page, new RectangleF(beginX, beginY + 150, page.Graphics.ClientSize.Width, beginY + 180));

-->I send this file to save method like syncfusion's code ;

            MemoryStream stream = new MemoryStream();
            await doc.SaveAsync(stream);
            doc.Close(true);
            SaveFile(stream, "GettingStarted.pdf");

--> And this is save method ;

     async void SaveFile(Stream stream, string filename)
        {
            stream.Position = 0;

            FileSavePicker savePicker = new FileSavePicker();
            savePicker.DefaultFileExtension = ".pdf";
            savePicker.SuggestedFileName = "Sample";
            savePicker.FileTypeChoices.Add("Adobe PDF Document", new List<string>() { ".pdf" });
            StorageFile stFile = await savePicker.PickSaveFileAsync();
            if (stFile != null)
            {
                Windows.Storage.Streams.IRandomAccessStream fileStream = await stFile.OpenAsync(FileAccessMode.ReadWrite);
                Stream st = fileStream.AsStreamForWrite();
                st.SetLength(0);
                st.Write((stream as MemoryStream).ToArray(), 0, (int)stream.Length);
                st.Flush();
                st.Dispose();
                fileStream.Dispose();
            }
            // Launch the retrieved file
            bool success;
            if (stFile != null)
                success = await Windows.System.Launcher.LaunchFileAsync(stFile);
        }


-->  Finally everything is OK , my pdf form is created . However , this code prints  TC KMLK/VERG SCL  on pdf page but as I said I want to print TC KİMLİK/VERGİ SİCİL .  How can I solve this problem? This is important for me , I am waiting for your help. 
  Have a good day.

George Livingston [Syncfusion]
Replied On March 3, 2014 04:30 AM UTC

Hi Ali Uslu,

Thank you for your patience.

The Times New Roman font does not support rendering Turkish characters, please find the sample available in the link below which uses Arial Unicode MS font to render the Turkish characters in the PDF document.

Please let us know if you need any further assistance.

Thanks,

George


Attachment: DrawTurkishTextSample_8303fece.zip

Ali Uslu
Replied On March 3, 2014 10:58 AM UTC

Hello thanks for your reply...
 I tried your sample code but  it couldn't solve my problem. I attached an image please check my code. The stream variable fontArial always return NULL. I tried with different paths but always return NULL.. I use visual studio 2012.
  

Attachment: screen_3f9dad7e.rar

George Livingston [Syncfusion]
Replied On March 5, 2014 04:21 AM UTC

Hi Ali Uslu,

Thank you for your update.

We suspect that the stream returns null is due to invalid build action assigned to the font "ARIALUNI.TTF". Can you please change the build action to Embedded Resource, in the properties of the same. Please find the screen shot for your reference.

Please let us know if you need any further assistance.

Thanks,

George


Attachment: FontProperties_a87317b8.zip

FMS Bilgisayar Otom. Dan. Egt. Hizm. Oto. San ve T
Replied On March 13, 2014 07:50 AM UTC

Thank you very very much. Arial.ttf solved the problem when I sign it as embedded resource . 
But now I have another problem , 
  My pdf is not showed in your pdfviewer component. I tried to run my code in windows 8.1 it worked. How can I show pdf by using pdfviewer in windows 8 ?

Suresh M [Syncfusion]
Replied On March 13, 2014 11:45 AM UTC

Thank you very very much. Arial.ttf solved the problem when I sign it as embedded resource . 
But now I have another problem , 
  My pdf is not showed in your pdfviewer component. I tried to run my code in windows 8.1 it worked. How can I show pdf by using pdfviewer in windows 8 ?

Hi,

 

Thank you for your interest in Syncfusion products.

 

We believe that a Direct trac incident is already created and followed up for this issue (incident 120293). Please follow up the incident for the solution.

 

Please let us know if you need any further assistance.

 

Thanks,

Suresh


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.

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

;