Trying to convert Word Doc to PDF

I'm converting word docs to PDFs and some of the word docs have images in them. The images display as corrupted once the PDF generates. I think it's because the images might actually be objects or something. Any ideas? 


4 Replies

LC Luke Carlson August 2, 2021 08:29 PM UTC

I think the image might be inserted by opening the word doc, going to insert, clicking object -> object... -> create from file -> choose a word doc... and the result is corrupted after running 

DocIORenderer.ConvertToPDF(wordDoc);




LC Luke Carlson August 3, 2021 07:36 PM UTC

Hi Lokesh! 


That's exactly it! I actually found a work around by switching to .NET Framework, before I was using .Net Core. If you guys fix it in Core will you let me know? Thank you! 



HC Hemalatha Chiranjeevulu Syncfusion Team August 4, 2021 09:33 AM UTC

Hi Luke,

Thank you for your patience.

On further analyzing, we have found that when we insert the object in the Word document using Microsoft Word Application. The display icon of the object is in “emf” format. Image Formats such as “wmf” and “emf” are limitation on the .Net Core applications. In our Essential DocIO library, if the Word document holds “wmf” and “emf” image, we have preserved RedX image with the same size of original EMF and WMF images in generated PDF document.

If you are using .NET Core 3.0 or later versions targeting applications, you can use WinForms NuGet Packages in .NET Core 3.0 or later versions targeting applications. To perform Word to PDF conversion using WinForms NuGet, please refer C# tab code example in our documentation.

Note: Using WinForms NuGet packages are limitation in Mac and Linux environment.

Please let us know if you have any other questions.

Regards,
Hemalatha C


Loader.
Up arrow icon