Пример #1
0
        internal static bool TryGetPasswordSettings(string fullpath, out PDFDocumentPasswordSettings settings)
        {
            settings = null;
            SecurityConfigurationSection section = ConfigurationManager.GetSection(SecuritySection) as SecurityConfigurationSection;

            IPDFSecurePasswordProvider provider;

            if (null != section && section.TryGetProviderForPath(fullpath, out provider))
            {
                if (provider.IsSecure(fullpath, out settings))
                {
                    return(null != settings);
                }
            }
            return(false);
        }
 public bool IsSecure(string documentpath, out IDocumentPasswordSettings settings)
 {
     settings = new PDFDocumentPasswordSettings(documentpath, configowner, configuser, restrictions, allowoverride);
     return(true);
 }