0

I want to convert word document to pdf in .netcore. I did that in .net4.5 ,but I need it in .netcore Without installation MicroSoft Office because i host my application on linux.

Suhail Keyjani
  • 488
  • 3
  • 10

1 Answers1

0

You might need to consider using a .NET Standard library that supports conversion to PDF.

One approach that I am familiar with (as I work for the vendor of the toolkit) is the LEADTOOLS Document Conversion SDK.

The .NET Core library has a DocumentConverter class that can be used to convert to PDF:

using (DocumentConverter documentConverter = new DocumentConverter())
{
   var format = DocumentFormat.Pdf;
   var jobData = DocumentConverterJobs.CreateJobData(inFile, outFile, format);
   jobData.JobName = "conversion job";
   var job = documentConverter.Jobs.CreateJob(jobData);
   documentConverter.Jobs.RunJob(job);
}