-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image missing when converting a word document to pdf in linux docker container. #302
Comments
@sunilshahi Aspose.Words for .NET Standard uses SkiaSharp to deal with graphics. To make it work on Linux, you should add reference either to SkiaSharp.NativeAssets.Linux or to SkiaSharp.NativeAssets.Linux.NoDependencies
If you do not have rights to install packages, or other reasons not to install |
@AlexNosk Thank you for your reply. However, when I tested with SkiaSharp.NativeAssets.Linux and installing libfontconfig1 it did not work. I can use the no dependencies package and move on for now. Just wanted to let you know. My Dockerfile if you are interested.
Thank for help. |
@sunilshahi Which versions of Aspose.Words and SkiaSharp.NativeAssets.Linux do you use in your project? I will check and let you know how it goes on my side. |
Here are my nuget versions from csproj.
Also this is the project that I was testing with if you are interested. Test Repo |
@sunilshahi Most likely the problem you have encountered is related to mono/SkiaSharp#1846. I would suggest you to use SkiaSharp 2.80.1, which is used in our internal tests and shows itself as quite stable. |
A year later and this single issue was the only thing to save me after 6+ hours of troubleshooting. Is the need for libfontconfig1 documented anywhere? |
@joshfria I believe this is described in SkiaSharp documentation, but I cannot find this right now. Also, this is described in Aspose.Words documentation here: |
Migrating web app froim windows stack to linux stack also requires SkiaSharp.NativeAssets.Linux.NoDependencies |
@sebestyn168 Yes, you are right. Aspose.Words for .NET Standard and .NET Core 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
If you do not have rights to install packages, or other reasons not to install |
testfile.docx
I create a ASP.NET core 3.1 Web Application and enabled docker suppot with Linux.
Then added nuget packages Aspose.Words 21.7.0
And added the above attached testfile.docx to the project.
On the privacy sample razor page, I changed the OnGet Method to look like this.
I then ran the project with docker.
Then when I navigate to "/Privacy" I get a pdf download file however the images are missing.
Orginal Docx document.
Downloaded Pdf document
infact even Aspose watermark image is missing when I do not apply license.
The text was updated successfully, but these errors were encountered: