Text To Pdf | emoji & special characters Conversion Issue | Request for Fix in Aspose Version 21.7.0 A

Hi Aspose Team,

We have encountered an issue with Aspose version 21.7.0 . Specifically, when smiley faces appear in the file, it throws an “Index was outside the bounds of the array”. We have tested this with the latest version and confirmed that the issue does not occur there.

However, due to our current constraints, we are not planning to upgrade to latest version at this time. We would greatly appreciate it if you could provide a fix for this issue in version 21.7.0.
Please find the attached sample file.
Code Used
using (TextReader tr = new StreamReader(inputPath))
{

 using (Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document())
 {
     Aspose.Pdf.Page page = pdfDocument.Pages.Add();
     page.PageInfo.DefaultTextState.Font = FontRepository.FindFont("Arial");
     page.PageInfo.DefaultTextState.FontSize = 8;
     page.PageInfo.Width = Aspose.Pdf.PageSize.PageLetter.Width;
     page.PageInfo.Height = Aspose.Pdf.PageSize.PageLetter.Height;
     page.PageInfo.Margin.Left = 70;
     page.PageInfo.Margin.Right = 70;
     page.PageInfo.DefaultTextState.LineSpacing = 1;
     
     Aspose.Pdf.Text.TextFragment text = new Aspose.Pdf.Text.TextFragment(tr.ReadToEnd());

     
     page.Paragraphs.Add(text);

     Aspose.Pdf.Optimization.OptimizationOptions optimizationOptions = new Aspose.Pdf.Optimization.OptimizationOptions
     {
         RemoveUnusedObjects = true,
         RemoveUnusedStreams = true,
         LinkDuplcateStreams = true,
         AllowReusePageContent = true
     };
     pdfDocument.OptimizeResources(optimizationOptions);

     pdfDocument.Save(outputPath);
 }

}
Sample_File.zip (170 Bytes)

Thanks,

@subramanyam.gvsrb

No edits are made for previous versions.
You should update to the latest version.

Why?