When I save my manipulated word file to a disk file and then reopen it as an aspose.words document and save to a file as FormatAsposePdf, I get no problems. I'm now trying to speed things up by streaming the intermediate results with the following errors:
If I save the doc to a stream as FormatAsposePdf, then I get I a null reference exception.
If I save to a stream in FormatDocument, then try to reopen that stream as a document, so I can save it to a stream as FormatAsposePdf, I get an Unknown file format exception.
I can't reproduce this in a small example so I'm attaching a rather large piece of code to demonstrate the problem. You can reproduce the problem by running main() and the exception will be thrown in in the method ConvertToPdf(). There are 2 versions of this method that return a stream, that correspond to the 2 problem instances listed above. They can be called un/commenting marked code in the method Run()
I'm using aspose.words version 3.5.0.0.
Can you please take a look?
Charu Tevari