The image is visible in PDF generated in local environment but not on deployed environment

@mdretirement ,
I am also facing the same issue,
I have added image as logo in the header of document.
The image is visible in PDF generated in local environment but not on deployed environment.

@madhav25 Most likely your application is deployed to Linux server, but the development environment is Windows.
Aspose.Words for .NET Standard and .NET6 use SkiaSharp to deal with graphics, to make it work on Linux you have to add reference either to SkiaSharp.NativeAssets.Linux or to SkiaSharp.NativeAssets.Linux.NoDependencies

If you add reference to SkiaSharp.NativeAssets.Linux, you should also install libfontconfig1 in your system. SkiaSharp.NativeAssets.Linux depends on this library. You can use the following command to install it:

apt-get update && apt-get install -y libfontconfig1

If you do not have rights to install packages, or other reasons not to install libfontconfig1, you can simply use SkiaSharp.NativeAssets.Linux.NoDependencies, which does not require installation of libfontconfig1.

@alexey.noskov ,
Thank you for the help,
The solution worked for me.

1 Like