I have a html file which is password protected.
How can i check whether it is encrypted.
I am using the following code to check that.
But it is not taking.
FileFormatInfo info = FileFormatUtil.DetectFileFormat(FileName);
Can you please help me on this
Thanks for your inquiry. FileFormatUtil.DetectFileFormat Method detects and returns the information about a format of a document stored in a disk file. It would be great if you please share your HTML file for investigation purposes.
FileFormatInfo info = FileFormatUtil.DetectFileFormat(MyDir + "Document.doc");
Console.WriteLine("The document format is: " + FileFormatUtil.LoadFormatToExtension(info.LoadFormat));
Console.WriteLine("Document is encrypted: " + info.IsEncrypted);
Console.WriteLine("Document has a digital signature: " + info.HasDigitalSignature);
Hi ,Tahir Manzoor
I am not able to attach the .html file with this.
Can you please suggest me how can i share this file
Hi ,Tahir Manzoor,
Here i am attaching the html file as zip
Thanks for sharing the information. The HTML file format do not contain the encryption as MS Word document contain. HTML do not allow us to set permission like MS Word do. However, you can write C# code which read HTML contents and find following form field.
Please let us know if you have any more queries.