Part of the stack trace:
System.OutOfMemoryException: Insufficient memory to continue the execution of the program.
at System.Text.StringBuilder.ExpandByABlock(Int32 minBlockCharCount)
at System.Text.StringBuilder.AppendWithExpansion(Char value)
at System.Text.StringBuilder.Append(Char value)
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Utilities.CrossReferenceCollectionReader.GetAllText(Reader reader, Int64 minOffset, Int64 maxOffset)
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Utilities.CrossReferenceCollectionReader.FindAllObjectOffsets(Reader reader, Dictionary`2 tokenToOffsets, Int64 minOffset, Int64 maxOffset)Solution - use the ExpandableMemoryStream for the import instead.
Error message:
System.InvalidCastException: 'Unable to cast object of type 'Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Types.PdfArray' to type 'Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.Functions.FunctionObject'.'Error message:
System.InvalidCastException: 'Unable to cast object of type 'Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.Forms.FormFieldsTree' to type 'Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Types.PdfArray'.'Add support for ToUnicode CMap stream. A side effect of not supporting it is the following: exporting PDF document which, for example, contains German umlauts, to plain text, leads to wrong characters in the resulting text. As possible workaround, the PdfFormatProvider instance of RadPdfViewer can be used to import the document. For example:FormatProviderSettings settings =newFormatProviderSettings(ReadingMode.OnDemand);PdfFormatProvider pdfViewerFormatProvider =newPdfFormatProvider(stream, settings);RadFixedDocument document = pdfViewerFormatProvider.Import();TextFormatProvider textFormatProvider =newTextFormatProvider();String text = textFormatProvider.Export(document);
For example exporting the text "\uD83D\uDE0A" with "Segoe UI Symbol" font family should export a single smiling face. Instead the characters are skipped during the export as PdfProcessing is trying to export them as separate char values ("\uD83D" and "\uDE0A") and the font does not contain glyphs corresponding to these char codes.
Text fields should support rich text strings allowing the user to use rich text elements and attributes.
As one can use annotations we should support attachments per page or per pdf-file.