ViewerConfigForcePasswordValidation Property
Indicates whether to force password validation for protected documents. By default is false.

Namespace: GroupDocs.Viewer.Config
Assembly: GroupDocs.Viewer (in GroupDocs.Viewer.dll) Version: 19.5
public bool ForcePasswordValidation { get; set; }

Property Value

Type: Boolean
When the password protected document is rendered with the caching enabled, the password is not validated on subsequent calls. Set this option true, when you need to force checking password each time the document is rendered. Please note, that the password validation increases rendering time.
The following example demonstrates how to force password validation.
ViewerConfig config = new ViewerConfig();
config.StoragePath = @"C:\storage\";
config.EnableCaching = true;
config.ForcePasswordValidation = true;

ViewerImageHandler imageHandler = new ViewerImageHandler(config);
string guid = "document.docx";
List<PageImage> pages = imageHandler.GetPages(guid);
See Also