IDocumentInfo

IDocumentInfo interface

Defines the methods that are required for getting the basic document information.

public interface IDocumentInfo

Properties

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.

Remarks

Learn more

Examples

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);
}

See Also