PDFsharp & MigraDoc Foundation https://forum.pdfsharp.net/ |
|
Migradoc cannot embed Microsoft JhengHei in Server 2012 https://forum.pdfsharp.net/viewtopic.php?f=2&t=3441 |
Page 1 of 1 |
Author: | peterlcf [ Fri Sep 02, 2016 9:59 am ] |
Post subject: | Migradoc cannot embed Microsoft JhengHei in Server 2012 |
Dear all, I have created a program to insert Chinese with font type Microsoft JhengHei under Windows 7. However when I deploy to Windows Server 2012, Migradoc fail to embed the font into pdf and it also embed Microsoft Sans Serif and the Chinese Characters become square. I have tried to change the font name "Microsoft JhengHei", "Microsoft JhengHei Regular", which fit the font name in control panel. Here is my code piece: Code: string fontChi = "Microsoft JhengHei"; Font fChi = new Font(fontChi); Style s2 = document.Styles["Heading1"]; s2.Font.ApplyFont(fChi); s2.Font.Size = 15; s2.ParagraphFormat.Alignment = ParagraphAlignment.Center; cell.AddParagraph("Some chinese...").Style = "Heading1"; Is there any server configuration in Windows Server 2012 needed in order to make MigraDoc working? Thanks in advance. Regards, Peter |
Author: | TH-Soft [ Fri Sep 02, 2016 10:28 am ] |
Post subject: | Re: Migradoc cannot embed Microsoft JhengHei in Server 2012 |
Hi, Peter! peterlcf wrote: Is there any server configuration in Windows Server 2012 needed in order to make MigraDoc working? Using a Font Resolver will be the clean way.Granting more permissions to the MigraDoc process (e.g. the Application Pool when run under IIS) should also do the trick. See also: viewtopic.php?p=9576#p9576 http://pdfsharp.net/wiki/Private%20Fonts.ashx |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |