Posted 25 November 2021, 6:36 am EST
Hi,
I am creating a PDF file using C1PdfDocument in which I am inserting a few Japanese characters.
If I open this PDF file in Adobe Acrobat Reader, the Japanese characters are not visible. Could you please let me know how to display Japanese characters in a PDF file?
I have attached a sample PDF file in which the issue is being observed. Also sharing the PDF creation code for reference.
C1.C1Pdf.C1PdfDocument pdf = new C1.C1Pdf.C1PdfDocument();
System.Drawing.Font font = new System.Drawing.Font(“MS Gothic”, 9, System.Drawing.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);