Using the following to detect file type, we are expecting to be getting a 40 returned (PDF), but are getting a 70 (TEXT) returned.
FileFormatInfo fileFormatInfo = FileFormatUtil. detectFileFormat (inputStream)
int saveFormat = FileFormatUtil. loadFormatToSaveFormat (fileFormatInfo.loadFormat)
return Optional. of (saveFormat)
The files are PDFs that appear to have been created with Microsoft’s Print to PDF functionality. I can provide sample docs as needed.