Hi,
we are trying to generate a PDF containing Hindi text. For example, during the generation of the text
वहनीय दस्तावेज़ स्वरूप
we see the following exception:
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index 515552fb-af14-ee11-9905-ac180eecb8f8 System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
at ..( , Int32 , UInt16[] , , Boolean )
at ..( , Int32 , Int32 )
at ..( , Int32& )
at ..( , Int32& )
at ..( )
at ..( , )
at a..( , , , String )
at a..(String )
at ..(String )
at ..( Font, encodedString, & registeredPdfString)
at ..( encodedString, & registeredPdfString)
at ..(String str, & registeredPdfString)
at ..(String unicodeString, resources, noCharacterAction, Boolean isEmbedded, Boolean isSubset, & encodedString, & selectedFont, String& fontResourceKey)
at ..([] choosingStrategies, String unicodeString, resources, noCharacterAction, Boolean isEmbedded, Boolean isSubset, & encodedText, & selectedFont, String& fontResourceKey)
at ..( , TextEditOptions )
at Aspose.Pdf.Text.TextSegment.set_Text(String value)
at Aspose.Pdf.Text.TextSegment.( )
at Aspose.Pdf.Text.TextBuilder.AppendText(TextFragment , Int32 , Boolean )
at ..( )
at ..Accept( )
at ..Accept( )
at ..Accept( )
at ..Accept( )
at ..Accept( )
at ..Accept( )
at ..Accept( )
at ..Accept( )
at ..(List`1 , Document , LoadOptions , Boolean )
at Aspose.Pdf.Document.a(Stream , LoadOptions )
We are using Aspose.PDF for .NET version 10.5.1 (quite old, I know), and we would like to stay away from migrating to newer versions for now as the API has changed considerably since.
On my local machine, the PDF generation succeeds, but the resulting PDF incorrectly displays ‘empty squares’ instead of the Hindi characters. This leads me to believe that it might an issue related to fonts.
Can you please suggest steps we could take to be able to correctly generate the pdf?
Thanks,
P.