Following the tutorial provided by ASPOSE I am able to save a document to a stream:
# Read only access is enough for Aspose.words to load a document.
stream = io.FileIO(docs_base.my_dir + "Document.docx")
doc = aw.Document(stream)
# You can close the stream now, it is no longer needed because the document is in memory.
stream.close()
# ... do something with the document.
# Convert the document to a different format and save to stream.
dstStream = io.FileIO(docs_base.my_dir + "Document.docx", "wb")
doc.save(dstStream, aw.SaveFormat.PDF)
dstStream.close()
However, when I do something with the document, the docx document is modified. How to do only save changes to the pdf output?