# Get file info This article explains how to detect document file type, size and calculate pages count with GroupDocs.Watermark. With [GroupDocs.Watermark](https://products.groupdocs.com/watermark/nodejs-java) you can retrieve the following information about a file: * `FileType` represents the document file type (PDF, Word document, Excel spreadsheet, PowerPoint presentation, image etc.). * `PageCount` represents the number of pages in a document. * `FileSize` represents the document file size. * `PagesInfo` represents the page information. The following code samples show how to get file information: ## Get file info for the file from a local disk ```javascript const watermarker = new groupdocs.watermark.Watermarker(documentPath); const documentInfo = watermarker.getDocumentInfo(); console.log('File type:', documentInfo.getFileType().toString()); console.log('Number of pages:', documentInfo.getPageCount()); console.log('Document size:', documentInfo.getSize(), 'bytes'); ```