IDocumentInfo
Leave feedback
On this page
Defines the methods that are required for getting the basic document information.
public interface IDocumentInfo
| Name | Description |
|---|---|
| FileType { get; } | Gets the file format description. |
| IsEncrypted { get; } | Gets a value indicating whether the document is encrypted and requires a password to open. |
| PageCount { get; } | Gets the total page count. |
| Pages { get; } | Gets the collection of document pages descriptions. |
| Size { get; } | Gets the document size in bytes. |
Learn more
The following example demonstrates how to retrieve the general document information using IDocumentInfo.
using (Watermarker watermarker = new Watermarker("D:\\input.pdf"))
{
IDocumentInfo docInfo = watermarker.GetDocumentInfo();
Console.WriteLine("Document size: {0}", docInfo.Size);
Console.WriteLine("Document format: {0}", docInfo.FileType.FileFormat);
Console.WriteLine("Document contains {0} pages", docInfo.PageCount);
}
- namespace GroupDocs.Watermark.Common
- assembly GroupDocs.Watermark
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.