# Get document information This article explains how to detect document file type and calculate pages count when merge PDF, Word(DOC, DOCX), Excel(XLS, XLSX), PowerPoint(PPT, PPTX) files with GroupDocs.Merger for Node.js via Java. [**GroupDocs.Merger**](https://products.groupdocs.com/merger/nodejs-java) allows to get document information which includes: * [FileType](https://reference.groupdocs.com/java/merger/com.groupdocs.merger.domain.result/IDocumentInfo#getType()) * [PageCount](https://reference.groupdocs.com/java/merger/com.groupdocs.merger.domain.result/IDocumentInfo#getPageCount()) * [Page info ](https://reference.groupdocs.com/java/merger/com.groupdocs.merger.domain.result/IPageInfo)for each document page. The following code sample demonstrates how to get document information. ```js const merger = new groupdocs.merger.Merger('c:/sample.vsdx'); const documentInformation = merger.getDocumentInfo(); const documentType = documentInformation.getType(); console.log(`Document info file format: ${documentType.getFileFormat()}`); console.log(`Document info page count: ${documentInformation.getPageCount()}`); ```