Image Property Problem

Hi

Attached are two ms word documents. 1. DocumentusingAspose.doc 2. DocumentWithoutAspose.doc

In first document I am using aspose.word 5.2.2 to insert image, using following code-

builder.InsertImage(@"C:\blue.jpg");

And In second word document I am inserting same image manually by using MS-Word’s InsertImage From File option.

But both document are inserting images in different fashion.
When I use Aspose to insert image, Image Size Property shows height =200% and width=200%.
and when insert using MS word direct option it scale it to 98% around.

Please let me know how I can insert image with 100% height,width property value.

Regards,
Dwarika

Hi
Thanks for your inquiry. It seems that problem occurs because image has 200dpi resolution. I created new issue #6028 in our defect database. I will notify you as soon as it is fixed.
As a workaround you can use the following code:

// Create document and DocumentBuilder
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
// Get image from file and insert it into the document
Image img = Image.FromFile(@"Test105\blue.jpg");
Shape sp = builder.InsertImage(img);
// Set size of inserted shape
sp.Width = ConvertUtil.PixelToPoint(img.Width, img.HorizontalResolution);
sp.Height = ConvertUtil.PixelToPoint(img.Height, img.VerticalResolution);
// Save document
doc.Save(@"Test105\out.doc");

I hope this could help you.
Best regards.

Hi,

Thanks for your quick reply.
Can you please tell me, default DPI for aspose where I no need to apply this workaround?

Thanks
Dwarika

Hi
Thanks for your inquiry. Please try using 96dpi.
Best regards.

Hi,
Please let me know when can we expect fix for this issue
Thanks,
Dwarika

Hi
Thanks for your inquiry. I will notify you as soon as it is fixed. Please expect a reply before next hotfix(within 3-4 weeks).
Best regards,

Hi Alexey,
I need to discuss with you with reference to one of the issues on ASPOSE support (Can you please provide me your phone number as I need to discuss on the issue mentioned above?
Please note that we are using licensed version of ASPOSE.Total product.
Thanks
Rahul Agnihotri
Project Manager – SHL (RE)
Rave Technologies (India) Pvt. Ltd.
Tel. : + 91 22 66606600`

Hi
Thanks for your inquiry. Aspose does not provide technical support over the phone. Phone support is only available for sales and purchase questions.
Issue #6028 is still unresolved. I will consult with our developers and provide you more information.
Best regards,

The issues you have found earlier (filed as 6028) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.