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

Free Support Forum - aspose.com

Screenshots not being resized

I’ve been using Aspose.Words as a conversion tool from doc to html for about a year now. On a previous thread, we worked through an issue with poor quality screenshots and viso drawings. For the past year, images have been converting nicely. Our current client uses a different third party program to create their word documents, and when I run our converter on these documents the images are not being resized. I am using Aspose.Words I explictly have in my code document.SaveOptions.HtmlExportScaleImageToShapeSize = True. I even tried setting it to false to see if it made a difference. I am attaching the original document and the output of the conversion. I can clearly see that the first image 149.001.png is 1024X708 and the image is been squeezed into a 655X453 space. What can I do to ensure that the conversion resizes the image correctly?

Thanks for your reporting this problem to us. I managed to reproduce the problem. I have logged this problem to our defect database as issue # 3901. Please expect a reply before the next hotfix (within 2-3 weeks). We might just fix it by then or provide more information
Also, the latest version of Aspose.Words is available for download from here.
Best regards.

Any new information on this error? We are going to be presenting the converted documents to the 4th largest corporation in the world on November 7th, and it would be nice if the images were legible. It would lend more credibility to both of our companies.

Unfortunately, this issue is still unresolved. We will let you know as soon as it is done.
Best regards.

Any idea of when this will be resolved? One of the reasons we decided to go with Aspose Total was the quick response to other issues we encountered during our evaluation period. Since we purchased the product, it seems that response time has declined.
It would be greatly appreciated if this problem can be addressed prior to November 7th. The other issue we are having with the erroneous image has not been addressed for the past three months and we can’t afford for this problem to continue that long. We would like to be able to demonstrate the talents of both Aspose and our own company to this important client, and would appreciate your help in doing that.

Sorry for delay. This bug has Show stopper priority. Thank you for your patience.
Best regards.

Any news on this? We postponed our demonstration in the hopes this would be corrected.
Can you tell me why this is occuring with these types of documents (and not the other documents I have been converting), so I can try to alter the document so it will convert properly?

Unfortunately, I have no news for you. A notification will be posted here in this thread as soon as it is done.
Best regards.

Can you tell me why it is happening with these particular documents, so I can alter the document so it doesn’t happen?

Sorry for the delay, I’m looking at this right now.

In your case HtmlExportScaleImageToShapeSize should be true (and it is the default value). It will cause high quality scaling to be used and the picture will appear nicer in HTML browser.
The original of the problem with all images is that the image size is often bigger than the shape size. So the image must be scaled for display. Depending on where the scaling happens you can get the image look differently.
When HtmlExportScaleImageToShapeSize is true, then Aspose.Words performs the scaling itself using high quality scaling. This results in a good looking image when viewed in the browser.
When HtmlExportScaleImageToShapeSize is false, then it is the browser that does the scaling and IE for example, scales using quick low quality algorithm and the image often appears ugly.
In your case, good scaling did not work like in your other documents because the resolution of the image was high 150dpi. The problem was that the original shape 491x338 points with an image 1024 x 708 at 150 dpi scaled down to the same size in points when 655x453 pixels at 96 dpi and Aspose.Words skipped the scaling altogether.
I fixed the problem and will release in 2-3 days.
If you need it urgent, you can workaround if you change the resolution from 150dpi to 96dpi for example in your document.

We have released a new version of Aspose.Words that contains a fix for your issue.
The new version of Aspose.Words is available for download from here.
Best regards.