|
@@ -65,7 +65,14 @@ namespace PasswordBoxPlus.Helper
|
|
|
window.Owner = Window.GetWindow(Application.Current.MainWindow);
|
|
|
window.PasswordDialog.SetShowText(document.FileName + " " + LanguageHelper.CommonManager.GetString("Tip_Permission"));
|
|
|
window.ShowDialog();
|
|
|
- return document.GetPermissionsInfo().AllowsCopying || document.GetPermissionsInfo().AllowsPrinting;
|
|
|
+ return !IsOwnerLocked(document);
|
|
|
+ }
|
|
|
+
|
|
|
+ public static bool IsOwnerLocked(CPDFDocument document)
|
|
|
+ {
|
|
|
+ var info = document.GetPermissionsInfo();
|
|
|
+ return !info.AllowsCopying || !info.AllowsPrinting || !info.AllowsCommenting ||
|
|
|
+ !info.AllowsHighQualityPrinting || !info.AllowsDocumentChanges || !info.AllowsDocumentAssembly;
|
|
|
}
|
|
|
}
|
|
|
}
|