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

Free Support Forum - aspose.com

ASPOSE.PDF - Converting TIFF To PDF Throws System.NullReference Exception

Hi Aspose Team,

We are using ASPOSE.PDF .NET Core library to convert TIFF image to PDF. When we try locally it’s working fine without any issue but on deployed DEV machine (PCF Container) which mostly a “Non-Wondows” machine; it’s throwing “System.NullReference” exception in below highlighted line (as in screen pic)
image.png (2.7 KB)

Detailed exception stack trace as below (mostly the highlighted area)

image.jpg (390.5 KB)

Can someone please help on this and let us know how we can fix this issue?

NOTE: Earlier we faced kind of similar issue with ASPOSE.NET library and fixed it by using the Nuget Package SkiaSharp.NativeAssets.Linux.NoDependencies … Thus out of curiosity I tried installing the same package in this project as well but no luck.

Waiting for your early response on this.

Thank You - Sirsendu

@alexey.noskov @tahir.manzoor FYI … for your visibility.


Please try to install all windows fonts in the system where you are facing exception. Also, please make sure to install libgdiplus package as well. In case issue still persists, please share a sample TIFF image with us so along with complete code snippet. We will test the scenario in our environment and address it accordingly.

@asad.ali Asad - Thanks for the suggestions provided. We did followed the provided suggestion and it worked like a charm and the said issue got resolved. You can please mark this thread as resolved. BUT, I do have a further question/suggestion from you as below:

In your comment, you mentioned

Please try to install all windows fonts in the system where you are facing exception

I wonder if all the Windows fonts (installed fonts in a word document) needed to support ASPOSE.PDF generation to work properly? (OR) Any specific fonts package would be good for us to work with ASPOSE.PDF?

Cause, if we really need to have to install all the fonts then that will be a solution our Team will have to design and implement; so that it’s gets deployed through Auto build/release pipeline.

Please let know.

Thank Again - Sirsendu


It is good to know that your issue has been resolved.

Please note that Aspose.PDF requires Windows Core Fonts for processing the PDF documents. You can install them by installing package msttcorefonts in your Linux environment. Furthermore, if you are working with any non-English language which requires fonts other than the core ones, you also need to install those fonts into the environment.