A 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.
A memory leak occurs in the RadTreeView control used for the table of contents in the RadPdfViewerNavigationPane, when changing the DocumentSource of RadPdfViewer at runtime.
To work this around, you can get the RadTreeView used by RadPdfViewerNavigationPane and manually clear its internal item storage before assigning the new DocumentSource.
private void ReloadDocument()
{
var navigationPane = this.pdfViewerNavigationPane;
var navigationPaneTreeView = navigationPane.FindChildByType<RadTreeView>();
if (navigationPaneTreeView != null)
{
object itemStorage = typeof(RadTreeView)
.GetProperty("ItemStorage", BindingFlags.Instance | BindingFlags.NonPublic)
.GetValue(navigationPaneTreeView);
MethodInfo itemStorageClearMethod = itemStorage.GetType().GetMethod("Clear", BindingFlags.Instance | BindingFlags.NonPublic);
itemStorageClearMethod.Invoke(itemStorage, null);
}
this.DocumentSource = theNewDocumentSource;
}
Some lines on attached files are to thick. Other pdf programs shows that correctly.
Regards
Janez