Question1:
The page number of the generated directory is wrong?
Question2:
Why can’t it be deployed in the linux environment, but only in the windows environment
Question1:
The page number of the generated directory is wrong?
Question2:
Why can’t it be deployed in the linux environment, but only in the windows environment
Could you please attach your input and output documents here for testing? We will check the issue and provide you more information.
The problem might occur, for example, because the fonts used in your original document are not available in the environment where document processing is performed. To updated TOC page numbers Aspose.Words need to build document layout and fonts are required for this. If Aspose.Words cannot find the font used in the document, the font is substituted. This might lead into document layout differences and as a result incorrect page numbers in the TOC. You can implement IWarningCallback to get notifications when font substitution is performed.
Could you please be more specific, what problems you have encountered when deployed to Linux?
If you use .NET Standard 2.0 or .NET6 version of Aspose.Words (if your project target framework is .NET Core or .NET5+), you need to make additional steps to make it work on Linux.
Aspose.Words for .NET Standard 2.0 and .NET6 uses 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
.
Note: There is a bug in 2.80.1 version of SkiaSharp.NativeAssets.Linux.NoDependencies and it also requires installing libfontconfig1
. If you 2.80.3 version it is not required.