Free Support Forum - aspose.com

Determining document type

Hi,

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,

Zeljko

Hi

Thanks for your inquiry. There is Document.DetectFileFormat method, which allows to detect format of the file. http://www.aspose.com/documentation/.net-components/aspose.words-for-.net-and-java/com/aspose/words/document.html#detectFileFormat(java.lang.String)

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: http://www.aspose.com/documentation/.net-components/aspose.words-for-.net-and-java/com/aspose/words/loadformat.html

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.