Get file info

On this page

GroupDocs.Annotation allows you to get the following file information:

  • FileType is a document file type (PDF, Word document, Excel spreadsheet, PowerPoint presentation or image etc.)
  • PageCount is a count of document pages
  • FileSize is a file size;

PagesInfo represents a List of the PageInfo objects which store information about each page. 

PageInfo has the following properties (in pixels): * Width

This properties supports all formats except Email and Html. Width and height are the same for all pages except the Cells formats.

The following code snippet shows how to get information about a document:

//Get file info for the file from local disk
using (Annotator annotator = new Annotator("input.docx"))
{
	IDocumentInfo info = annotator.Document.GetDocumentInfo();
    int width = info.PagesInfo[0].Width;
    int height = info.PagesInfo[0].Height;
    Console.WriteLine("\nFile type: {0}\nNumber of pages: {1}\nDocument size: {2} bytes", info.FileType, info.PageCount, info.Size);
}

On this page