# Get file info This page describes how to detect document file type, size and calculate pages count when annotate documents or images with GroupDocs.Annotation. GroupDocs.Annotation allows you to get the following file information: * [FileType](https://reference.groupdocs.com/annotation/java/com.groupdocs.annotation/idocumentinfo/#getFileType--) is a document file type (PDF, Word document, Excel spreadsheet, PowerPoint presentation or image etc.) * [PageCount](https://reference.groupdocs.com/annotation/java/com.groupdocs.annotation/idocumentinfo/#getPageCount--) is a count of document pages * [FileSize](https://reference.groupdocs.com/annotation/java/com.groupdocs.annotation/idocumentinfo/#getSize--) is a file size; [PagesInfo](https://reference.groupdocs.com/annotation/java/com.groupdocs.annotation/idocumentinfo/#setPagesInfo-java.util.List-com.groupdocs.annotation.models.PageInfo--) represents a `List` of the [PageInfo](https://reference.groupdocs.com/annotation/java/com.groupdocs.annotation.models/pageinfo/) objects which store information about each page.  [PageInfo](https://reference.groupdocs.com/annotation/java/com.groupdocs.annotation.models/pageinfo/) has the following properties (in pixels): * [Width](https://reference.groupdocs.com/annotation/java/com.groupdocs.annotation.models/pageinfo/#getWidth--) * [Height](https://reference.groupdocs.com/annotation/java/com.groupdocs.annotation.models/pageinfo/#getHeight--) 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: {{< tabs "example1">}} {{< tab "Java" >}} ```java // 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(); System.out.println( "\nFile type: "+info.getFileType() +"\nNumber of pages: "+info.getPageCount() +"\nDocument size: {2} bytes"+info.getSize() ); } finally { if (annotator != null) { annotator.dispose(); } } ``` {{< /tab >}} {{< /tabs >}}