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:

Created:

Updated:

Platform:

Replies:

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

hello,
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) ?
Regards,
Thibault

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. 

Regards, 
Dilli babu. 


Thibault
Replied On November 12, 2018 08:26 AM UTC

Helolo,

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

regards,

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. 

Regards, 
Dilli babu 


Thibault
Replied On November 12, 2018 01:11 PM UTC

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

Regards,
Thibault

Thibault
Replied On November 12, 2018 01:15 PM UTC

COUld you provide a patch for 16.3.0.21?

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. 

Regards, 
Dilli babu. 


CONFIRMATION

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.

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

;