Error "Input file is of unknown type because file extension is not specified." when converting from an InputStream

Product: PDFTron SDK jar
Product Version: 9.4.2

Please give a brief summary of your issue:
Error “Input file is of unknown type because file extension is not specified.” when converting from an InputStream

Please describe your issue and provide steps to reproduce it:
I use a trial version of PDFTron SDK to convert PDF files loaded from an InputStream.
Whenever I execute my code I get this error as output:

class com.pdftron.common.PDFNetException: Exception: 
    Message: An error occurred while converting the file.
Detailed error:
   Input file is of unknown type because file extension is not specified.
    Conditional expression: false
    Version      : 9.4.2-a2633dd18a
    Platform     : Windows
    Architecture : AMD64
    Filename     : Convert.cpp
    Function     : trn::PDF::Convert::ConvertHelper::OpenDoc
    Linenumber   : 3128

My code is

      Convert.HTMLOutputOptions htmlOutputOptions = new Convert.HTMLOutputOptions();
      htmlOutputOptions.setContentReflowSetting(Convert.HTMLOutputOptions.e_reflow_paragraphs);
      htmlOutputOptions.setNoPageWidth(true);
      PDFDoc doc = new PDFDoc(input.openInputStream());
      Convert.toHtml(doc, outputFile.getAbsolutePath(), htmlOutputOptions);

Hi Guillaume,

To investigate further could you please provide the input file you are converting to an input stream and trying to convert?

I get the same issue with any PDF file, for instance this one: https://www.africau.edu/images/default/sample.pdf

Our Convert.toHtml method does not accept buffers or input streams. It only accepts filepaths or the PDFDoc class:
https://docs.apryse.com/api/PDFTronSDK/dotnet/pdftron.PDF.Convert.html#pdftron_PDF_Convert_ToHtml_System_String_System_String_

However, our PDFDoc class can be initialized from a buffer or stream:
https://docs.apryse.com/api/PDFTronSDK/dotnet/pdftron.PDF.PDFDoc.html#pdftron_PDF_PDFDoc__ctor_System_Byte___System_Int32_

So the correct workflow here would be to create a PDFDoc class from your buffer/input stream and then pass that PDFDoc instance to the Convert.ToHtml method.