Hello All,
Can anyone suggest me how to change the font properties of Text Annotation content since i have facing issue of data in Japanese is not supported in PdfTextAnnotation.
Code:
[code]var CNNAnnot = new PdfTextAnnotation();
CNNAnnot.Flags = PdfAnnotationFlags.Locked;
CNNAnnot.Title = "Connector Details";
//CNNAnnot.Elements
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;
if (CNNRemarks != "-")
CNNAnnot.Contents += Environment.NewLine + "Remarks : " + CNNRemarks + Environment.NewLine;
if (CNNExcessData != 0)
{
CNNAnnot.Contents += Environment.NewLine + "===============" + Environment.NewLine;
CNNAnnot.Contents += "Applicability" + Environment.NewLine + "===============" + Environment.NewLine;
for (int iteration = 0; iteration <= CNNSheetCountColumn - CNNExcessData; iteration++)
{
CNNAnnot.Contents += CNNtitleContent[iteration] + " : " + CNNNumberContent[iteration] + Environment.NewLine;
}
}
if (newConnector == true)
CNNAnnot.Color = XColors.Gold;
else
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); [/code]
Here SM name is fetched from excel and it is added in PDF as annotation but SM name in japanese is not displayed correctly.
could you please anyone suggest be how to proceed with this