I am looking for writing Japanese characters using FixedContentEditor. Can u please suggest the code.
Thanks in advance.
Aishwarya
1 Answer, 1 is accepted
0
Martin
Telerik team
answered on 27 Sep 2022, 10:29 AM
Hello Aishwarya,
You have several options:
If you are creating a cross-platform app, using PdfProcessing .Net Standard assemblies you can choose from:
Registering a font using the FontsRepository class and then setting this font to the desired text to be drawn by using the FixedContentEditor`s TextProperties:
Another option is to pass the needed fonts using the FixedExtensibilityManager`s FontsProvider property. Detailed information can be found in the Cross Platform Support Fonts article. An example can be found in our GitHub repository: GenerateDocument.
If you are creating a .Net Framework app you can use PdfProcessing .Net Framework binaries and the needed fonts will be loaded out of the box from the OS (if they are installed):
RadFixedDocument document = new RadFixedDocument();
RadFixedPage firstPage = document.Pages.AddPage();
FixedContentEditor editor = new FixedContentEditor(firstPage);
editor.Position.Translate(20, 20);
editor.DrawText("こんにちは世界!");
I hope this helps. Do not hesitate to contact us if any additional questions arise.
Regards,
Martin
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.