GoToPage() method is not working correctly in some cases when called in DocumentChanged event handler. The known cases are described below:
1. When RadPdfViewer and the document are loaded initially and document is set through the RadPdfViewer.Document property.
Workaround: DocumentSource property could be set (in XAML or in code-behind) instead of the Document property. If the Document property is used, this should be done after RadPdfViewer is loaded.
2. When the ScaleMode is changed in DocumentChanged event handler and then GoToPage() method is called in the same event handler.
Some of the lines that should be dashed are rendered as continuous lines.
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" (č).
The slow performance when creating thumbnail is only reproducible with specific documents.
As a result, the glyphs are not measured and positioned properly. The issue applies to the TrueType and Type1 fonts.
The PDF document with images shows black canvas:
NOTE:
Works OK in version 2023.2.713A password is asked although Adobe opens the document without one when the document is encrypted with "Encryption of data using the RC4 or AES algorithms with a file encryption key length of 40 bits." - Version 1 (V 1) Revision 2 (R 2).
Similar cases (V1 R3 and V2 R3) are handled in the following item: PdfViewer: A password is asked although Adobe opens the document without one.
The document will be imported with a loss of content. The reason is that ASCII85Decoder will throw an ArgumentException when the stream doesn't end with '~>'. Although this is invalid case according to PDF specification, other applications are handling it and the document is successfully visualized in them. We may also consider implementing workaround that handles such invalid streams.
According to the PDF specification (Adobe® Portable Document Format Version 1.7):
Append a rectangle to the current path as a complete subpath, with lower-left corner (x, y) and dimensions width and height in user space.
The operation:
x y width height re
An invalid case:
0 - 595 -842 re
This leads to an exception thrown: System.NullReferenceException: 'Object reference not set to an instance of an object.'
Introduce events similar to the PageRenderStarted and PageRenderCompleted ones that the Telerik UI for WinForms RadPdfViewer provides:
WinForms PdfViewer How-To Handle Rendering Events - Telerik UI for WinForms
This is not quite a valid PDF file scenario according to PDF file specification. However, we may try handling it in order to show the correct number of pages. When the kid is of type Pages, it should be added to the pages traversal recursion only the first time it is met.
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.