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: (1.4 MB)

Sorry, wrong 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.

Any status update on the development of this?


We are afraid that the earlier logged ticket has not been yet resolved due to other pending issues in the queue. Nevertheless, we will share updates with you as soon as we have some about ticket resolution. We apologize for your inconvenience.

1 Like

Any update on porting this library to Aspose.Drawing so we can use it on osx?


We are afraid that no progress has been made yet towards the ticket resolution. We will inform you in this forum thread as soon as we have some updates in this regard. We apologize for the inconvenience.