Page 1 of 1

LoadFromStream does not accept an html document

Posted: Fri Oct 01, 2021 11:34 am
by chrisb
I am trying to load an html file into Docuvieware to display.

The stream comes from a blob storage account and works correctly for doc files, however when trying to load an html stream, even if the contents of the stream are as simple as:

Code: Select all

<html><h1>Hey</h1></html>
Then the call

Code: Select all

 var status = docuVieware.LoadFromStream(doc.stream, OwnStream: false);
returns the status "UnsupportedFormat"

Is this functionality supported? If I pass in the DocumentName parameter with a ".html" suffix the document is still unsupported. Am I missing something?

Thanks

Chris

Re: LoadFromStream does not accept an html document

Posted: Mon Oct 04, 2021 9:49 am
by Fabio
Hello Chris,

Are you using the last version of DocuVieware? (the HTML support has been implemented on version 3.1.107).

Here is the code I used for testing:

Code: Select all

System.IO.Stream stream = new System.IO.FileStream(@"D:\example.html", System.IO.FileMode.OpenOrCreate);
GdPictureStatus status = new GdPictureStatus();
status = e.docuVieware.LoadFromStream(stream, false);
With best,
Fabio