Convertion Docx to Images is not working as expected : result are different than original file

Hi,


when i try the demo here :  ASP.NET MVC DocIO Word to Image Example - Syncfusion Demos with our own document the resultat is not good at all. Some images are missing for no reason. how can i fix it ?


Attachment: 211221_Test_import_board_23f390ed.7z

6 Replies

LB Lokesh Baskar Syncfusion Team December 22, 2021 10:27 AM UTC

Hi Rémy, 
The image in the input Word document is in “emf” format. Image Formats such as “wmf” and “emf” are limitation on the .Net Core applications and Azure environment. We have hosted our demos sample in Azure environment, so if the Word document holds “wmf” and “emf” image, we have preserved RedX image with the same size of original EMF and WMF images. Please refer the below UG documentation to know more about this. 
Regards,
Lokesh B 



RB Rémy Berrebi January 3, 2022 09:57 AM UTC

Not sure to understand the solution of this issue : can't we convert "on the fly" such images to png and put it inside PDF output file ? What is the best option to host the final application using DocIO ?



LB Lokesh Baskar Syncfusion Team January 4, 2022 07:14 AM UTC

Hi Rémy, 
If you wish to convert the Word document to image in .NetCore means, currently we don’t have support to convert word document to images(.png, .jpeg) in Core. Please refer to the below UG documentation notes.
https://help.syncfusion.com/file-formats/docio/word-to-image?cs-save-lang=1&cs-lang=asp.net%20core

As a workaround solution for converting a Word document to Image in .NET Core. This could be achieved by converting Word to PDF and then PDF to Image, the sample for this is attached in the below link.
 
Required NuGet packages 
Sample 
   http://www.syncfusion.com/downloads/support/directtrac/general/ze/WordToImageNetCore-1353703563

Regarding can't we convert "on the fly" such images to png and put it inside PDF output file:
Yes, we can convert the EMF image present in word document to PNG or JPEG. To achieve this requirement please refer to the below KB documentation.
 
Lokesh B 



RB Rémy Berrebi January 4, 2022 09:02 AM UTC

I don't clearly understand this " currently we don’t have support to convert word document to images(.png, .jpeg) in Core." i was talking about the demo refer on the first message : ASP.NET demo to convert word doc to image


Mainly, to let you understand what is all about : we need to find a solution to convert any word doc to images, and because we have a full license of syncfusion we are trying to find out if we can use your librairies to do so. The goal is to create a simple API/Web service to receive a Word document, and to send back images. for now we don't really stick to one language. C#, ASP.Net, .NET ... mainly we use nodeJS but DocIO is not available in nodeJS. so we try to search another way.



LB Lokesh Baskar Syncfusion Team January 5, 2022 05:13 PM UTC

Hi Rémy, 

Thank you for your update.

 
As mentioned earlier, in the input Word document, there is a emf image present in it. Please refer to the below screenshot.  
 

To preserve output image document properly in word to image conversion in this demo link
ASP.NET MVC DocIO Word to Image Example - Syncfusion Demos, we suggest you change the metafile image formats(.emf) to bitmap image format (JPEG or PNG) using the Microsoft Word application and convert that modified word document to images using above demo link. Now the resultant images preserve properly as similar as input document. Please refer to the modified input document.
https://www.syncfusion.com/downloads/support/directtrac/general/doc/211221_Test_import_board_Modified-1130894409.docx

Otherwise you can change the metafile image formats(.emf) to bitmap image format (JPEG or PNG) in the input document using DocIO. We have prepared the sample application in ASP .NET MVC to convert word to image. In this sample we have change the EMF images in the input document to PNG before converting to word to image. Kindly host this sample at your end and ensure.
 
Regards,
Lokesh B 
 




RB Rémy Berrebi January 10, 2022 11:00 PM UTC

Great ! going to try that asap :)


Loader.
Up arrow icon