I am currently working on a project that involves parsing a word document and storing certain artifacts from said document. I successfully extracted all the images from the word document, however the document also contains graphs that were created using a TextBox with shapes inside. Is there a way to extract those graphs as flat images? If it’s not possible with Aspose.Word perhaps there’s another way to achieve this programmatically? Any help would be greatly appreciated.
Thank you for additional information. Unfortunately, I cannot help you in this case. Shape in your document is GroupShape. Currently, there is no way to render GroupShapes to images using Aspose.Words. I linked your request to the appropriate issue. You will be notified as soon as this feature is supported. But currently, I cannot promise you that this feature will be supported in Aspose.Words for java anytime soon. We should first implement this in .NET version. So the best estimate at the moment is somewhere at the beginning of the next year.
Thanks for your response Alexey, your help is greatly appreciated. Now that you’ve confirmed that it’s not doable in Aspose, could you maybe suggest another path? Any input or suggestion will do, no matter how unorthodox it might be. At this point the only way I can think of doing this, is manually taking screen captures of the page and cropping out the image. Any thoughts?
I found about 50% of the solution. In word if you go to File->Save As… and select “Web Page, Filtered” option. Word will export the document along with flat images for those grouped shapes. now only if i could invoke this behavior from java. any suggestions Alexey? I tried using the doc.save() function with SaveFormat.HTML as the second argument. that however doesn’t have the same behavior and those grouped shapes are taken out and only text is left.
Aspose.Words does not use MS Word Automation. So if you save your document to HTML using Aspose.Words GroupShape will be lost. You can try using MS Word Automation as a workaround. http://www.adp-gmbh.ch/blog/2004/october/14.html
Alexey, thank you for pointing me in the right direction. if I couldn’t find a way to do it through Aspose, this is the 2nd best solution I was looking for.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.