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.
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");
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,