We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

jpg image orientation while mailmerging

Thread ID:





140806 Nov 7,2018 04:59 PM UTC Nov 15,2018 04:15 PM UTC UWP 6
Tags: DocIO
Asked On November 7, 2018 04:59 PM UTC

I try to import jpg image files with docio mailmerging in a word document. it seems that EXIF jpg orientation is not kept when importing the jpg data into the resulting word file.
Do you intend intend to deal with that in next version?
What can I do to obtain the right orientation (performing rotation before mailmerging? how to know the jpg file orientation) ?

Dilli Babu Nandha Gopal [Syncfusion]
Replied On November 8, 2018 10:50 AM UTC

Hi Thibault, 

Thank you for contacting Syncfusion support. 

We have tried to reproduce the reported image rotation problem when executing mail merge with the rotated image in DocIO, but it preserves properly with the actual rotation. For your reference, we have prepared a sample application to execute mail merge with the rotated JPG image and it can be download from the below link: 

We suspect that the problem might be due to image and the input Word document used at your end. So, could you please provide us the following things from your end: 
1. Modified sample of above along with input Word document and images used at your end. 
2. Expected output document. 
This will be more helpful to check on the reported problem and then we will provide you the appropriate solution at the earliest. 

Note: If you have any confidential data in your Word document, please replace with some dummy data and provide us the same. We just need your document to recreate the problem you face. 

Please let us know if you have any other questions. 

Dilli babu. 

Replied On November 12, 2018 08:26 AM UTC


I replaced in your sample the jpg file with mine, and see the result: the picture orientation is wrong.


Thibault BEGIN

Attachment: rotated_jpg_94f0f597.zip

Dilli Babu Nandha Gopal [Syncfusion]
Replied On November 12, 2018 12:36 PM UTC

Hi Thibault, 

On further analyzing with the given image, we have found that rotation is applied in the input image itself. Microsoft Word application considered this auto rotation value when inserting image in the Word document. We have found the solution to identify the rotation in the jpg image in .NET Framework platform. We have used the functionality from System.Drawing.Image to identify the rotation which is not available in UWP platform. Currently we are analyzing to identify the image rotation in UWP platform.

At the meantime, could you please provide your confirmation whether you need the solution in .NET Framework or UWP platform? This will be more helpful to provide the solution at the earliest. 

Dilli babu 

Replied On November 12, 2018 01:11 PM UTC

I need the solution for UWP platform and also for Xamarin Windows Forms (this last one in 2019).


Replied On November 12, 2018 01:15 PM UTC

COUld you provide a patch for

Dilli Babu Nandha Gopal [Syncfusion]
Replied On November 15, 2018 04:15 PM UTC

Hi Thibault, 

Thank you for your patience. 

We have prepared a sample based on your requirement which can be downloaded from the following link. 

In this sample, we have done the following things:
1. Loads a template Word document using DocIO. 
2. Executes mail merge in the document. 
3. While executing mail merge for the image field, gets the index of field and paragraph. 
4. Iterates to the resultant picture in the mail merged document. 
5. Rotate the picture. 
6. Saves the Word document. 

Please let us know if you have any questions. 

Dilli babu. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon