Read docx content without opening a document

Hi,

I am writing my own file system where I need to read contents for docx file when read in intercept. when I load the document in document instance, it calls the read again before I call “GetText” on it. this is causing a sort of infinite loop.

With this I could understand that when I load a docx file in document instance, it creates a temporary file, to which it open and read and hence the loop is.

is there anyway that I can read the content but not actually open it? just like ReadFile API from Windows.

I am using Aspose.Words.CPP.

Thanks
Deepanshu

@deepanshugarg09 Aspose.Words does not use the file after loading it into the Document object. You can even load the document from stream:
https://docs.aspose.com/words/cpp/create-or-load-a-document/#load-from-a-stream
After loading the stream can be disposed, since the document is loaded into the DOM and original stream is no longer required.