Taking more time while saving document

I am using aspose java to generate the report. For saving the document, I am using the following code.

a) Create document(Document document = new Document();)
b) Create the builder object(DocumentBuilder builder = new DocumentBuilder(doc);)
c) Write all the data into builder object one by one using builder.write() method.
d) document.save(directory.RTF);

It took more time to save the file in the specified path for large amount of data. Moreover sometimes empty file gets saved.
Can anyone please help me to resolve this issue?
Thanks in advance.

Hi Suganya,

Thanks for your inquiry. In case you’re using an old version of Aspose.Words for Java, I would suggest you please upgrade to the latest version (14.8.0) of Aspose.Words. You can download it from the following link. I hope, this helps.

Also, please attach complete source code to be able to reproduce these issues on our end? We will investigate the issues and provide you more information.

Best regards,