Wed Mar 13, 2024 8:50 am
There are no other special settings. The English section works fine. However, Hangul's handwriting is broken. Here are the currently working codes. From the letters in the title section "테스트" to Hangul in the data table, all the letters are broken. Is there a way?
PdfDocument doc = new PdfDocument();
PdfUnitConvertor unitCvtr = new PdfUnitConvertor();
PdfMargins margin = new PdfMargins();
margin.Top = unitCvtr.ConvertUnits(2.54f, PdfGraphicsUnit.Centimeter, PdfGraphicsUnit.Point);
margin.Bottom = margin.Top;
margin.Left = unitCvtr.ConvertUnits(3.17f, PdfGraphicsUnit.Centimeter, PdfGraphicsUnit.Point);
margin.Right = margin.Left;
PdfPageBase page = doc.Pages.Add(PdfPageSize.A4, margin);
float yy = 10;
PdfBrush brush1 = PdfBrushes.Black;
PdfTrueTypeFont font1 = new PdfTrueTypeFont(new Font("Times New Roman", 16f, FontStyle.Bold));
PdfStringFormat format1 = new PdfStringFormat(PdfTextAlignment.Center);
page.Canvas.DrawString("Report", font1, brush1, page.Canvas.ClientSize.Width / 2, yy, format1);
page.Canvas.DrawString("테스트", font1, brush1, page.Canvas.ClientSize.Width / 2, yy + 30, format1);