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):

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:

// This example demonstrates document info extraction

// Create an instance of Annotator class
Annotator annotator = new Annotator("inputPath");
try {
	// Get document info
	IDocumentInfo info = annotator.getDocument().getDocumentInfo();
		"\nFile type: "+info.getFileType()
		+"\nNumber of pages: "+info.getPageCount()
		+"\nDocument size: {2} bytes"+info.getSize()
} finally {
	if (annotator != null) {

On this page