Posted 24 February 2022, 8:13 am EST
Hi
I am creating a PDF file by using C1PdfDocument. The PDF file contains a combination of Japanese and English characters.
When I open that PDF file in Acrobat reader, all the characters gets displayed correctly. However, when I open that PDF file in Microsoft Edge/Chrome, Japanese characters do not get displayed. Only English characters get displayed.
I am attaching the sample PDF file.
The following is the code to create a PDF file.
C1.C1Pdf.C1PdfDocument pdf = new C1.C1Pdf.C1PdfDocument(); Font font = new Font("MS Gothic", 9, FontStyle.Regular); pdf.PaperKind = System.Drawing.Printing.PaperKind.A4; RectangleF rect = pdf.PageRectangle; rect.Inflate(-48, -48); pdf.Security.AllowCopyContent = false; pdf.Security.AllowEditContent = false; pdf.Security.AllowEditAnnotations = false; while (true) { int nextChar = pdf.DrawString(data, font, Brushes.Black, rect); if (nextChar >= data.Length) { break; } data = data.Substring(nextChar); pdf.NewPage(); } pdf.Save(path);
Please let me know what could be the problem with the PDF created by C1PdfDocument.