Converting xlsx files to pdf, error “The type initializer for '_Dz' threw an exception.”
Problem reported by Dmitriy Lesev - 7/14/2020 at 3:29 AM
Resolved
Good day
We are developing Amazon Web Services Lambda to convert different file types to pdf using DocumentUltimate, .NET Core 2.1
The conversion was tested in the local console application, everything works. In AWS Lambda some types (eml, msg) are converted well, but converting all xlsx files causes an error – “The type initializer for '_Dz' threw an exception.”, also the similar error “The type initializer for '_j6' threw an exception.” with some docx files.
Could you please advise?

5 Replies

Reply to Thread
0
Cem Alacayir Replied
Employee Post
Which version are you using? Latest is Version 5.4.2 - July 10, 2020.
0
Dmitriy Lesev Replied
yes, the latest NuGet 5.4.2 was installed
0
Dmitriy Lesev Replied
Additional info: some msg files (with attachments?) also can't be converted, error “The type initializer for '_j6' threw an exception.”  
But the same msg files are converted to eml successfully.


0
Cem Alacayir Replied
Employee Post
Unfortunately, as of current version ASP.NET Core on Linux is not supported. This is because some of our internal native DLLs are Windows-only. In future we may support Linux if we port those native DLLs to Linux (or exclude some features for Linux build).
0
Cem Alacayir Replied
Employee Post
FYI, there are some improvements in DocumentUltimate for Linux:

Version 5.6.0 - September 15, 2020
  • Added: Initial "ASP.NET Core on Linux" support, only limited features are available:

    • DocumentConverter works except for conversions that require PortableEngine.

    • DocumentViewer is not available as PortableEngine does not support Linux yet (due to Windows native DLL dependency).
      The explanatory error "PortableEngine is currently supported only on Windows platform." will be thrown until it's supported.
      Note that component will render but you will get the error when loading a document.

  • Improved: Updated AssemblyResolver (4.1.0.0) for initial Linux support (no unnecessary extraction of Windows native DLLs).

  • Added: DocumentUltimateConfiguration.CheckPlatformSupport method which is used to check a feature is supported on current OS platform.
    Throws PlatformNotSupportedException if not. Possible feature values are "DocumentViewer", "PortableEngine".

Reply to Thread