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

Free Support Forum - aspose.com

AsposePub:TypeInitializationException:The type initializer for 'Gdip' threw an exception

I’m building an application that runs on both windows and macos.

This application converts pub to pdf.

On Windows (10) it works but on MacOs I get:

TypeInitializationException:The type initializer for ‘Gdip’ threw an exception.

We’re using the latest AsposePub and the app is built in .net 6.

See code example:

AsposePage.zip (1.4 MB)

Sorry, wrong zip.

AsposePub.zip (547.3 KB)


The issue seems related to some missing dependency in macOS. Can you please make sure that libgdiplus package is installed and up-to-date in the system? In case issue still persists, please let us know.

Yes it’s installed.

image.png (5.6 KB)


A ticket as PUBNET-278 has been logged in our issue tracking system for the sake of further investigation. We will look into its details and keep you posted with the status of its correction. Please be patient and spare us some time.

We are sorry for the inconvenience.

Any progress on this ticket?


The issue is under the phase of the investigation at the moment. We are afraid that no updates are available yet regarding its resolution. However, we will surely let you know once we have some news about its fix ETA.

We are sorry for the inconvenience.