Description:
When adding FormField of type Text, and setting its FieldValue to a value containing non-standard characters (i.e the Norwegian characters æ,ø,å ), the value seems to be displayed incorrect when in NON-edit mode.
However, when you CLICK on the textfield to edit its value, the characters are displayed correctly.
Environment:
Platform: .net 4.5.2
Aspose Pdf version: 11.5.0.0
Steps to reproduce: 1. Using the following code:
var Pdf = new Aspose.Pdf.Generator.Pdf();
Pdf.PageSetup.PageWidth = Aspose.Pdf.Generator.PageSize.A4Width;
Pdf.PageSetup.PageHeight = Aspose.Pdf.Generator.PageSize.A4Height;
Pdf.PageSetup.Margin = new Aspose.Pdf.Generator.MarginInfo() { Top = 20, Left = 20, Right = 20, Bottom = 20 };
Pdf.DefaultFontName = "Arial Unicode MS";
Pdf.TextInfo.FontName = "Arial Unicode MS";
var sect=Pdf.Sections.Add();
sect.Paragraphs.Add(new Text("Testing ÆØÅ "));
sect.Paragraphs.Add(new FormField()
{
FormFieldType = Aspose.Pdf.Generator.FormFieldType.Text,
FieldName = "inputname",
FormWidth = 100,
TextFontName = "Arial Unicode MS",
FieldValue = "Testing ÆØÅ "
});
Pdf.SetUnicode();
Pdf.Save(@"..\..\output\test.pdf");
System.Diagnostics.Process.Start(@"..\..\output\test.pdf");
2. Open the PDF. The value of the formfield looks strange.
3.Click on the formfield. The value looks correct.