We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Invalid image stream (The type initializer for 'Gdip' threw an exception.) - Aspose.PDF

I am getting an error when processing a PDF:

Invalid image stream (The type initializer for ‘Gdip’ threw an exception.)
Value cannot be null. (Parameter ‘fileContents’)

The code does work on Windows.

We are deploying this .net 6 app onto a Linux machine which runs .net apps through Docker.

What can we do to make this work on the docker based machine?

I tried to install libgdiplus and ttf-mscorefonts.

What can be done to make this work. The latest version of Aspose.PDF is being used. .Net Core 6. PDF has header and footer image.

To confirm the PDF output does work on the Windows machine.

@usmanpop

We already logged an issue to test Aspose.PDF functionality under .NET 6.0 in non-Windows environments as PDFNET-50918. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

A post was split to a new topic: Aspose.PDF is not working with .NET 6.0 version