0

I am looking for a third party library that will convert the doc/docx extensions to gif. If it would be easier to convert from doc/docx to pdf then to gif that would be fine as well.

I am using ASP.NET Core and it has been very hard to find libraries that do this, but I am willing to pay.

1

The LEADTOOLS SDK has .NET Core NuGet packages that support (among many other things) the conversion from Doc/Docx to image formats like GIF and PNG. (Disclaimer: I am an employee of this toolkit’s vendor). There’s a simplified ASP.NET project on our forums that implements HTML5 Image Gallery using ASP.NET Core MVC. The project contains code that converts common image formats to web-friendly PNG. You can easily modify it to support converting Word files to GIF with 2 changes:

  1. Add the “Leadtools.Formats.Document” NuGet package to the project.
  2. In the file “Controllers\HomeController.cs”, change 3 lines that contain “Png” or “png” to become “Gif” and “gif”, respectively. The 3 lines are:

    codecs.Save(image, ms, RasterImageFormat.Png, 0);
    ...
    codecs.Save(thumbnail, ms, RasterImageFormat.Png, 0);
    return new FileContentResult(ms.ToArray(), "image/png");

For details about LEADTOOLS support for .NET Core, see this page.
You can find more demos and details here about our NuGet packages (both .NET Core and .NET Framework).

1

This requirement can be achieved using Syncfusion Word Renderer and PDF Renderer. These NuGet packages are available in nuget.org

NuGet package Required
Syncfusion.DocIORenderer.Net.Core - for converting Word document to PDF
Syncfusion.EJ2.PdfViewer.AspNet.Core.Windows - for converting PDF to Image

We have created simple .NET Core web application for Convert Word document to GIF image, and the sample can be downloaded from the following location, http://www.syncfusion.com/downloads/support/directtrac/general/ze/WordToGIF_Sample990468206

Note:
For converting PDF to Image on Linux and OSX operating systems use the corresponding libraries as below,
- Syncfusion.EJ2.PdfViewer.AspNet.Core.Linux
- Syncfusion.EJ2.PdfViewer.AspNet.Core.OSX

I work for Syncfusion.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.