Skip to main content
All docs
V24.1

Office File API Cloud Support Troubleshooting Guide

  • 4 minutes to read

This topic describes how to resolve issues that may occur when an application runs on a machine that doesn’t support GDI (Linux) or in an environment with limited GDI API support (Azure).

Common Issues

DLL Not Found

If an application throws a System.DllNotFoundException, make sure that you added all required libraries and NuGet packages. A common reason for this exception is a missing reference to DevExpress.Drawing.Skia. Check the following topics for the complete list of required libraries:

The Resulting Document Uses Unexpected Fonts

This issue occurs because the required fonts are not installed on the machine where your application runs. Office File API libraries try to substitute missing fonts with available alternatives.

Ensure that required fonts are available on target machines when your application runs. Use one of two ways to do this:

Important

If you plan to install a font onto a client machine, review that font’s license agreement for distribution terms.

The Exported PDF File or Image Contains a Black Rectangle

This issue usually occurs if you don’t specify a platform in web application settings. In such cases, the system may deploy the Skia library for the wrong platform. As a result, the application cannot load this assembly dynamically at runtime.

Specify the platform in the application settings, which will force the Visual Studio Publish command to publish the correct version of the Skia library. For example, you can apply this setting in the project’s settings.

Linux and Docker Issues

When you deploy your application to Linux or use a Dockerfile, a System.TypeInitializationException may occur with the following message: “Unable to load shared library ‘libSkiaSharp’ or one of its dependencies”.

This exception usually indicates that your Docker image is missing required libraries. Make sure that your Dockerfile is correct and all required libraries are installed to the base/runtime image. Refer to the following topics for more information:

Azure Issues

The following exceptions may occur in applications deployed on Azure:

  • DevExpress.Pdf.Drawing.PdfRenderingOutOfMemoryException
  • System.ArgumentException
  • Parameter is not valid

These exceptions may be thrown because Azure doesn’t fully support GDI/GDI+ library calls. Try one of the following solutions:

Enable Azure Compatibility

Specify the AzureCompatibility.Enable option at application startup to disable specific GDI/GDI+ calls that are not supported in Azure. Other methods are used to draw content.

Use Cross-Platform Drawing Engine

Some platform-dependent methods don’t work in Linux-based environments or certain Azure hosting plans. Configure your app to use the Skia rendering engine:

Change Azure Plan

Your Azure plan may not include enough memory or resources allocated on the server. Try using another Azure plan to publish your project and check whether the issue occurs.

Get More Help

If these steps did not resolve issues that you encountered with your document, please contact our DevExpress Support Team and include the following information in your ticket so we can find a solution as quickly as possible:

  • The code snippet you utilize to process the document.
  • Platform and framework.
  • Operating system. Clarify information related to the hosting environment (Azure, Azure Function, AWS, etc.). Also clarify if you use any additional tools (for example, Docker) and specify their configurations.
  • Docker file (if used)
  • The document you want to process
  • DevExpress product versions
  • Call stack (if available)