![]() If the answer is the right solution, please click "Accept Answer" and kindly upvote it. Using (Document document = new Document(pdfdoc)) PdfFont chinese = PdfFontFactory.CreateFont(fontProgram, PdfEncodings.IDENTITY_H) PdfDocument pdfdoc = new PdfDocument(new PdfWriter(file)) įontProgram fontProgram = FontProgramFactory.CreateFont(Path.Combine(_env.WebRootPath, "font", "NotoSansCJKsc-Regular.otf")) Public void GeneratePdf(string paragraphs, string destination)įileInfo file = new FileInfo(destination) Var path = Path.Combine(_env.WebRootPath, "files","output.pdf") ![]() Perhaps the issue relates that font file (NotoSansTC-Regular.otf), might be it was corrupted, try to re-download it.īesides, you can also store the font file in the version) and download the font file from here: NotoSansTC-Regular.otf.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |