Free Support Forum -

Determining document type


Does Aspose have any tool for determining document type? To be precise, is there a method which I can call with a file or InputStream given, and which returns me something which tells me that file or InputStream is Word document, PowerPoint presentation…?

Maybe this forum is not appropriate for this kind of question, so I am sorry for bother you.




Thanks for your inquiry. There is Document.DetectFileFormat method, which allows to detect format of the file.

But currently there is only overload, which accepts file name as a parameter.

This method allows detecting file formats, which are available in LoadFormat enum:

Best regards.

The issues you have found earlier (filed as 14939) have been fixed in this .NET update and in this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.