I have downloaded a trial version a few days ago. My scenario:
In a loop, load RTF as a memory stream, then save it as a PDF to a memory stream.
I have tried to cobble code together to prove it works and it ALWAYS crashes on the second iteration with "Index was out of range. Must be non-negative and less than the size of the collection."
I have tried all the different "load rtf" methods I could find but none seem to work.
Code snippet below:
Dim memoryStream1 As New MemoryStream()
Dim streamWriter As New StreamWriter(memoryStream1)
Dim memoryStreamPDF As New MemoryStream()
If Me.ReferralBodyFormat = "RTF" Then
streamWriter.Write(Me.ReferralBody)
memoryStream1.Position = 0
'convert to pdf
Dim document As New Document()
document.LoadFromStream(memoryStream1, FileFormat.Rtf) <------ *** errors here ***
document.SaveToStream(memoryStreamPDF, FileFormat.PDF)
document.Close()
document.Dispose()
End If
memoryStreamPDF.Position = 0
Thanks,
Dave