我已经编写了一个c#代码以在带有标志的文本中添加注释,但是注释内容是日语,在程序执行后,当我看到注释内容是“4WASÕíóÈC/ U”某种其他语言时。
可以更改注释内容的字体以考虑日语
var CNNAnnot = new PdfTextAnnotation();
CNNAnnot.Flags = PdfAnnotationFlags.Locked;
CNNAnnot.Title = "Connector Details";
if (newConnector == true)
{
communicater = new synchronizer(newConnectorFinder);
Invoke(communicater);
CNNAnnot.Contents = "Connector Number : " + cNumber + " (New)" + Environment.NewLine;
}
else
CNNAnnot.Contents = "Connector Number : " + cNumber + Environment.NewLine;
CNNAnnot.Contents += Environment.NewLine + "SC Name : " + SCName + Environment.NewLine;
CNNAnnot.Contents += Environment.NewLine + "SM Name : " + SMName + Environment.NewLine;
}
CNNAnnot.Color = XColors.Green;
CNNAnnot.Icon = PdfTextAnnotationIcon.Insert;
option.Annotations.Add(CNNAnnot);
var CNNrect = new XRect();
xCoOrdinate = textStringBox.X;
yCoOrdinate = textStringBox.Y;
textWidth = textStringBox.Width;
textHeight = textStringBox.Height;
ConnectorLocationInSc.Add(cNumber, Math.Floor(xCoOrdinate).ToString() + ":" + Math.Floor(yCoOrdinate).ToString());
CNNrect = gfx.Transformer.WorldToDefaultPage(new XRect(new XPoint(xCoOrdinate, yCoOrdinate), new XSize(0, 0)));
CNNAnnot.Rectangle = new PdfRectangle(CNNrect);