We have an issue with a document saving. In the code snippet below this line hangs forever
inDocument.Save(oStream, oOptions)
I need a solution to this! I am using version 20.12.0
Private Function pf_ConvertDoc(ByVal inDocument As Document, ByVal inSaveFormat As SaveFormat) As String
Dim sResult As String = String.Empty
If (Not inDocument Is Nothing) Then
Dim oStream As Stream = Nothing
Dim oReader As StreamReader = Nothing
oStream = New MemoryStream()
Try
If (inSaveFormat = SaveFormat.Html) Then
Dim oOptions As Saving.HtmlSaveOptions = New Saving.HtmlSaveOptions(SaveFormat.Html)
oOptions.ExportImagesAsBase64 = True
inDocument.Save(oStream, oOptions)
Else
inDocument.Save(oStream, inSaveFormat)
End If
oStream.Position = 0
oReader = New StreamReader(oStream)
sResult = oReader.ReadToEnd()
Catch
sResult = String.Empty
Finally
If (Not oStream Is Nothing) Then
oStream.Close()
oStream.Dispose()
End If
If (Not oReader Is Nothing) Then
oReader.Close()
oReader.Dispose()
End If
End Try
End If
Return sResult
End Function