PageInfo Class
Represents a brief page information.
Inheritance Hierarchy
SystemObject
  GroupDocs.RedactionPageInfo

Namespace: GroupDocs.Redaction
Assembly: GroupDocs.Redaction (in GroupDocs.Redaction.dll) Version: 20.7
Syntax
public class PageInfo

The PageInfo type exposes the following members.

Constructors
  NameDescription
Public methodPageInfo
Initializes a new instance of the PageInfo class
Properties
  NameDescription
Public propertyHeight
Gets or sets the page height.
Public propertyPageNumber
Gets or sets the page number.
Public propertyWidth
Gets or sets the page width.
Methods
  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Remarks
Learn more
Examples

The following example demonstrates how to retrieve the general document information using IDocumentInfo.

C#
try
{
    using (Redactor red = new Redactor(@"C:\Temp\testfile.doc"))
    {
        IDocumentInfo docInfo = red.GetDocumentInfo();
        Console.WriteLine("Document size: {0}", docInfo.Size);
        Console.WriteLine("Document format: {0}", docInfo.FileType.FileFormat);
        Console.WriteLine("Document contains {0} pages", docInfo.PageCount);
        foreach (PageInfo page in docInfo.Pages)
        {
            Console.WriteLine("Page {0} size is {1}x{2}", page.PageNumber, page.Width, page.Height);
        }
    }
}
catch (GroupDocs.Redaction.Exceptions.PasswordRequiredException)
{
    Console.WriteLine("You are trying to access document which is password protected. Please, set the password.");
}
catch (GroupDocs.Redaction.Exceptions.IncorrectPasswordException)
{
    Console.WriteLine("The provided password is not valid.");
}
See Also