Articles in this section
Category / Section

How to deploy .NET Core application with Word to PDF conversion?

11 mins read

Syncfusion® Essential® DocIO is a .NET Core Word library used to create, read, and edit Word documents programmatically without Microsoft Word or interop dependencies. Using this library, you can convert Word document to PDF using ASP.NET Core application in Linux OS.

NuGet packages required:

To deploy .NET Core application with Word to PDF conversion capabilities in Linux OS, the following NuGet packages needs to be referred in your .NET Core application.

From v28.2.3:

NuGet package

Installation command in package manager

  1. Syncfusion.DocIORenderer.Net.Core

Install-package Syncfusion.DocIORenderer.Net.Core -source

https://www.nuget.org/packages/Syncfusion.DocIORenderer.Net.Core/

  1. SkiaSharp.NativeAssets.Linux

Install-Package SkiaSharp.NativeAssets.Linux -Version 3.116.1 -source

https://www.nuget.org/packages/SkiaSharp.NativeAssets.Linux/3.116.1

  1. HarfBuzzSharp.NativeAssets.Linux

Install-Package HarfBuzzSharp.NativeAssets.Linux- Version 8.3.0.1 -source
https://www.nuget.org/packages/HarfBuzzSharp.NativeAssets.Linux/8.3.0.1

From v27.2.2:

NuGet package

Installation command in package manager

  1. Syncfusion.DocIORenderer.Net.Core

Install-package Syncfusion.DocIORenderer.Net.Core -source

https://www.nuget.org/packages/Syncfusion.DocIORenderer.Net.Core/

  1. SkiaSharp.NativeAssets.Linux

Install-Package SkiaSharp.NativeAssets.Linux -Version 2.88.8 -source

https://www.nuget.org/packages/SkiaSharp.NativeAssets.Linux/2.88.8

  1. HarfBuzzSharp.NativeAssets.Linux

Install-Package HarfBuzzSharp.NativeAssets.Linux- Version 7.3.0.2 -source
https://www.nuget.org/packages/HarfBuzzSharp.NativeAssets.Linux/7.3.0.2

From v23.1.40:

NuGet package

Installation command in package manager

  1. Syncfusion.DocIORenderer.Net.Core

Install-package Syncfusion.DocIORenderer.Net.Core -source

https://www.nuget.org/packages/Syncfusion.DocIORenderer.Net.Core/

  1. SkiaSharp.NativeAssets.Linux

Install-Package SkiaSharp.NativeAssets.Linux -Version 2.88.6 -source

https://www.nuget.org/packages/SkiaSharp.NativeAssets.Linux/2.88.6

  1. HarfBuzzSharp.NativeAssets.Linux

Install-Package HarfBuzzSharp.NativeAssets.Linux- Version 7.3.0 -source
https://www.nuget.org/packages/HarfBuzzSharp.NativeAssets.Linux/7.3.0

From v20.3.0.56:

NuGet package

Installation command in package manager

  1. Syncfusion.DocIORenderer.Net.Core

Install-package Syncfusion.DocIORenderer.Net.Core -source

https://www.nuget.org/packages/Syncfusion.DocIORenderer.Net.Core/

  1. SkiaSharp.NativeAssets.Linux

Install-Package SkiaSharp.NativeAssets.Linux -Version 2.88.2 -source

https://www.nuget.org/packages/SkiaSharp.NativeAssets.Linux/2.88.2

  1. HarfBuzzSharp.NativeAssets.Linux

Install-Package HarfBuzzSharp.NativeAssets.Linux- Version 2.8.2.2 -source
https://www.nuget.org/packages/HarfBuzzSharp.NativeAssets.Linux/2.8.2.2

From v20.1.0.x:

NuGet package

Installation command in package manager

  1. Syncfusion.DocIORenderer.Net.Core

Install-package Syncfusion.DocIORenderer.Net.Core -source

https://www.nuget.org/packages/Syncfusion.DocIORenderer.Net.Core/

  1. SkiaSharp.NativeAssets.Linux

Install-Package SkiaSharp.NativeAssets.Linux -Version 2.88.0-preview.209 -source

https://www.nuget.org/packages/SkiaSharp.NativeAssets.Linux/2.88.0-preview.209

  1. HarfBuzzSharp.NativeAssets.Linux

Install-Package HarfBuzzSharp.NativeAssets.Linux- Version 2.8.2-preview.209 -source
https://www.nuget.org/packages/HarfBuzzSharp.NativeAssets.Linux/2.8.2-preview.209

 From v19.4.0.x:

NuGet package

Installation command in package manager

  1. Syncfusion.DocIORenderer.Net.Core

 

Install-package Syncfusion.DocIORenderer.Net.Core -source

https://www.nuget.org/packages/Syncfusion.DocIORenderer.Net.Core/

  1. SkiaSharp.NativeAssets.Linux

Install-Package SkiaSharp.NativeAssets.Linux -Version 2.80.2 -source

https://www.nuget.org/packages/SkiaSharp.NativeAssets.Linux/2.80.2

  1. HarfBuzzSharp.NativeAssets.Linux

Install-Package HarfBuzzSharp.NativeAssets.Linux- Version 2.6.1.7 -source
https://www.nuget.org/packages/HarfBuzzSharp.NativeAssets.Linux/2.6.1.7

From v18.4.0.x to v19.4.0.x:

NuGet package

Installation command in package manager

  1. Syncfusion.DocIORenderer.Net.Core

 

Install-package Syncfusion.DocIORenderer.Net.Core -source

https://www.nuget.org/packages/Syncfusion.DocIORenderer.Net.Core/

  1. SkiaSharp.NativeAssets.Linux

Install-Package SkiaSharp.NativeAssets.Linux -Version 2.80.2 -source

https://www.nuget.org/packages/SkiaSharp.NativeAssets.Linux/2.80.2

 

Note:

From v18.4.0.x, the dependent package SkiaSharp is upgraded from 1.59.3 to 2.80.2 version and it is mandatory to use SkiaSharp.NativeAssets.Linux v2.80.2 package instead of SkiaSharp.Linux v1.59.3 for converting Word documents into PDF in Linux environment.

Prior to v18.4.0.x:

NuGet package

Installation command in package manager

  1. Syncfusion.DocIORenderer.Net.Core

 

Install-package Syncfusion.DocIORenderer.Net.Core -source https://www.nuget.org/packages/Syncfusion.DocIORenderer.Net.Core/

  1. SkiaSharp

Install-Package SkiaSharp -Version 1.59.3 -source https://www.nuget.org/packages/SkiaSharp/1.59.3

Additionally, we required SkiaSharp.Linux helper NuGet package which can be generated by following below steps.

  1. Download libSkiaSharp.so from here.
  2. Create a folder and name it as SkiaSharp.Linux. Then, place the downloaded file in the folder structure “SkiaSharp.Linux\runtimes\linux-x64\native”
  3. Create a nuspec file with name SkiaSharp.Linux.nuspec using following metadata information and place it inside SkiaSharp.Linux folder. The nuspec file can be customized as per your need.
    <?xml version="1.0" encoding="utf-8"?><package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">    <metadata>        <id>SkiaSharp.Linux</id>        <version>1.59.3</version>        <title>SkiaSharp for Linux</title>        <authors>Syncfusion Inc.</authors>        <owners>Syncfusion Inc.</owners>        <requireLicenseAcceptance>false</requireLicenseAcceptance>        <description>SkiaSharp for Linux is a supporting package for Linux platforms.</description>        <tags>linux,cross-platform,skiasharp,net-standard,net-core,word-to-pdf</tags>        <dependencies>            <group targetFramework=".NETStandard1.4">                <dependency id="SkiaSharp" version="1.59.3" />            </group>        </dependencies>    </metadata></package>
    
  1. Make sure the nuget.exe file is present along with SkiaSharp.Linux folder (in the parent folder of SkiaSharp.Linux folder). If not download it from here.
  2. Open a command prompt and navigate to SkiaSharp.Linux folder
  3. Execute the following command

nuget pack SkiaSharp.Linux\SkiaSharp.Linux.nuspec -outputdirectory "C:\NuGet ". The output directory can be customized as per your need.

Now, SkiaSharp.Linux NuGet will be generated in the mentioned output directory and add the generated NuGet as additional reference.

You can also find the SkiaSharp.Linux NuGet package created by us from here.

See Also:

Convert Word document to PDF in ASP.NET Core in Windows OS

Convert Word document to PDF in Azure Environment

Convert Word document to PDF in Azure App service on Linux

Convert Word document to PDF in Azure Functions V1

Convert Word document to PDF in AWS Lambda

Mail merge Word document and convert to PDF in Azure Functions V2


Conclusion

I hope you enjoyed learning about how to deploy .NET Core application with Word to PDF conversion capabilities in Linux OS.

You can refer to our ASP.NET Core Word Library feature tour page to know about its other groundbreaking feature representations.

You can also explore our .NET Core Word Library example to understand how to present and manipulate data. For current customers, you can check out our .NET Core components from the License and Downloads page.

If you are new to Syncfusion®, you can try our 30-day free trial to check out our .NET Core Word Library and other .NET Core components.

If you have any queries or require clarifications, please let us know in comments below. You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!


Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied