We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Taking much time in converting Microsoft Word to PNG

Hi

I use “aspose word” component. In my scenario, Try to convert specific page index of Microsoft word to PNG. But some times this process take much time. I checked my document file and found if document has VBScript(visual basic script) , this process take much time. Can any body help me to find solution. I think there are two distinct solutions.
1. Change aspose converting scenario to block vbscript.
2. Detect file that has vbscript and prevent to process these type of files.

Thanks a lot.


Hi there,


Thanks for your inquiry. Please share your sample document along with the sample code. We will test the scenario at our end and will guide you accordingly. Furthermore, please note Aspose.Words does not execute macros during document manipulation.

Best Regards,

Thanks for your reply.

I use following code to convert first page of Microsoft word document to picture (png format).
// code based on java standard edition 1.6
//begin of code
int pageNumber=0;
byte[] docData;// content of My Word document as byte array
ByteArrayOutputStream outputDocOuputStream = new ByteArrayOutputStream();
com.aspose.words.ImageSaveOptions options =
new com.aspose.words.ImageSaveOptions(com.aspose.words.SaveFormat.PNG);
options.setResolution(160);
options.setPageIndex(pageNumber);
com.aspose.words.Document doc = new
com.aspose.words.Document(new ByteArrayInputStream(docData));
doc.ensureMinimum();
doc.save(outputDocOuputStream, options);
// end of code

You said right “aspose word component” does not execute macro.

But I think pictures of document effected directly on total converting execution time.
When I try to remove some organization pictures from our document to prepare to send to you as sample file, I check again it and found, converting process took less time.

I must be test more to find root cause of this problem and prepare sample document for you.

Thanks again.

With regards

Hi again

I check again and I think found answer to my problem. When open Microsoft word and check all pictures with details, I found although picture as organization symbol is small but resolution of main picture is so great. I try to decrease this resolution and converting time decreased so much.

Our customer should be change their templates and use picture with little quality not huge best quality.


Thanks again

Have safe day.

Hi there,


Thanks for your feedback. It is good to know that you have managed to resolve the issue at your own. Please note Aspose.Words processes files in memory, so performance depends upon the file size and contents along with system resources.

Please keep using Aspose.Words and feel free to contact us for any further assistance.

Best Regards,