When importing a document containing a single associated widget annotation merged into the field dictionary the field is skipped on import and an exception is thrown.
According to the PDF Specification: Field Dictionaries: Kids:
An array of indirect references to the immediate children of this field.
In a non-terminal field, the Kids array is required to refer to field dictionaries that are immediate descendants of this field. In a terminal field, the Kids array ordinarily must refer to one or more separate widget annotations that are associated with this field. However, if there is only one associated widget annotation, and its contents have been merged into the field dictionary, Kids must be omitted.
There are missing characters when importing documents containing Standard fonts with a Differences array defined in the Encoding, which contains characters that do not fit in the first 255 glyph definitions in the font. Most of these characters are the ones with an accent such as "ccaron" (č).
RadPdfViewer can not find startxref keyword at the end of a document if the document contains many zero bytes at its end. NotSupportedException is thrown with "Startxref keyword cannot be found" message. Workaround: Trim the ending zero bytes before loading the document to the PdfViewer. This is currently noted in the WinForms KB article: http://www.telerik.com/support/kb/winforms/details/notsupportedexception-startxref-keyword-cannot-be-found-when-loading-pdf-file-in-radpdfviewer-for-winforms
The object definitions are split into several lines:
From the PDF specification:
Prev: (Present only if the file has more than one cross-reference section; must not be an indirect reference) The byte offset from the beginning of the file to the beginning of the previous cross-reference section.
When importing such a document an exception is thrown: System.ArgumentNullException: 'Value cannot be null.
Inserting PNG ImageSource into a document and applying the document instance directly to the RadPdfViewer`s Document property (without exporting to stream) leads to a wrong image rendering.
Workaround: Export the document with the PdfFormatProvider:
MemoryStream ms = new MemoryStream();
PdfFormatProvider pdfFormatProvider = new PdfFormatProvider();
pdfFormatProvider.Export(radFixedDocument, ms);
PdfDocumentSource source = new PdfDocumentSource(ms, pdfViewer.DefaultImportSettings);
this.pdfViewer.DocumentSource = source;
This is not a valid PDF scenario as having appearance state requires having multistate appearances. However, we should handle this invalid document scenario on our side so that the app does not crash with NullReferenceException.
When there is no ToUnicode CMap, the text from the Simple Font instance should be extracted by mapping the glyph name to its corresponding charcode according to Adobe Glyph List. Additionally, the Differences array should be included in these calculations when there is custom encoding. The current implementation of RadPdfViewer makes ToString to the original char id byte value which leads to wrong characters.
Creating a PdfViewer instance without adding it in the visual tree, leads to leaked document presenter instances when the TouchManager is enabled.
Workaround: Disable the TouchManager:
Telerik.Windows.Input.Touch.TouchManager.IsEnabled = false;
Currently, the PdfProcessing document model is providing support only for a single function in the Function entry.
According to the PDF Specification: Function: A 1-in, n-out function or an array of n 1-in, 1-out functions.
BT 48 819.32 Td -16.6 Ts (Some text to display) Tj ET
Currently, when we parse inline image dictionaries we rely on the assumption that the colorspace will be PdfName. However, there are files with complex colorspaces that are PdfArray and InvalidCastException is thrown. All the content after this exception is lost and not visualized by RadPdfViewer.