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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Rotated Images when converting from Word to PDF

Thread ID:

Created:

Updated:

Platform:

Replies:

149824 Dec 10,2019 09:17 PM UTC Dec 16,2019 05:11 PM UTC ASP.NET Core - EJ 2 5
loading
Tags: DocIO
Rick Stephens
Asked On December 10, 2019 09:17 PM UTC

We are trying to convert a Word document to a PDF.  Some of the images inside of the document are landscape.  Inside of the word doc, they are rotated 270 degrees to be in portrait orientation.  After converting, the don't render correctly on the page.  They are off center.  If I manually save the image, rotate, and reinsert into the document, everything looks correct.  Unfortunately, doing this isn't a long term option, as the documents are provided to us by a 3rd party.  

I've attached some screenshots of the documents.

Syncfusion.DocIO.NET.Core: v17.3.0.34
Syncfusion.DocIORenderer.Net.Core: v17.3.0.34



using (var converter = new DocIORenderer())
{
converter.Settings.ChartRenderingOptions.ImageFormat = ExportImageFormat.Jpeg;
converter.Settings.EmbedFonts = true;
converter.Settings.PreserveFormFields = true;
var pdfDocument = converter.ConvertToPDF(wordDocument);

using (var outStream = new FileStream(outfile, FileMode.Create))
{
pdfDocument.Save(outStream);
outStream.Flush(true);
outStream.Close();
pdfDocument.Close(true);
}
}

Attachment: Page1Of2_6dc1cc30.zip

Vijayasurya Anandhan [Syncfusion]
Replied On December 11, 2019 10:39 AM UTC

Hi Rick,

Thank you for contacting Syncfusion support.

We have checked the reported issue by creating a simple word document with rotated image and converting it to PDF, but it is working fine in our end.
 
For more reference, please find the sample which we have tried in our end to reproduce the issue from the following link.
https://www.syncfusion.com/downloads/support/forum/149824/ze/Rotated_image1541738503.zip
 
We suspect that the reported issue might be specific to the input Word document. So, could you please provide us the input Word document along with the complete code snippets which used at your end by modifying the above sample to reproduce the exact problem. Thereby we will analyze further and 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 in your end. 
 
Regards, 
Vijayasurya A



Rick Stephens
Replied On December 11, 2019 02:18 PM UTC

Vijayasurya,

Thank you for your reply.  Please see the attached document to reproduce the issue.

Attachment: fromscratch_546e7ec.zip

Rick Stephens
Replied On December 11, 2019 02:30 PM UTC

It looks like it's the text wrapping settings that causes the rendering issues.  Anything but "In Line with Text" has undesirable results.  Square results in my original issue where "Tight" results in the image in it's original orientation.  It looks like there are lots of bugs around orientations still.  

Vijayasurya Anandhan [Syncfusion]
Replied On December 12, 2019 08:55 AM UTC

Hi Rick,

Thank you for your details.

We can reproduce the issue with "
Picture with rotation and text wrapping is not preserved properly in the generated PDF” from our side and suspect it be a defect. We will validate this issue and update you with more details on 16th December 2019. 
  
Please let us know if you have any queries. 

Regards,
Vijayasurya A


Madhan Kumarasamy [Syncfusion]
Replied On December 16, 2019 05:11 PM UTC

Hi Rick,

Thank you for your patience.

We confirmed the issue “
Picture with rotation is not aligned properly while converting a Word document to PDF” as a defect. We have logged a defect report. This fix will be included in our 2019 Volume 4 sp1 which will be available in mid of January 2020 tentatively.

Note: If you want patch for defect then kindly let us know the currently installed version, so that we can provide a patch in that version based on our SLA policy.

Please let us know if you need any further assistances in this.

Regards,
Madhan k
 


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.

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

Live Chat Icon For mobile
Live Chat Icon