Free Support Forum - groupdocs.com

Document conversion issue in Linux using .NET

Hello,

I am trying to run the conversion examples from Linux, and I’m getting this error whenever I try to run any conversion method:

Unhandled Exception: GroupDocs.Conversion.Exceptions.GroupDocsConversionException: The type initializer for   ' threw an exception.

at GroupDocs.Conversion.Converter.Convert(SaveDocumentStreamForFileType document, ConvertedDocumentStream documentCompleted, ConvertOptionsProvider convertOptionsProvider)
at GroupDocs.Conversion.Examples.CSharp.QuickStart.HelloWorld.Run() in /pathtoproject/GroupDocs.Conversion-for-.NET-master/Examples/GroupDocs.Conversion.Examples.CSharp/QuickStart/HelloWorld.cs:line 21
at GroupDocs.Conversion.Examples.CSharp.RunExamples.Main() in /pathtoproject/GroupDocs.Conversion-for-.NET-master/Examples/GroupDocs.Conversion.Examples.CSharp.Core/RunExamples.cs:line 22

Seems that the problem is related to the Conversion API itself, but I have no clue how it can be solved. I’d really appreciate some help here.

Thanks,
José Carlos.

2 Likes

@JCEntrena

Please share following details and we’ll investigate the issue:

  • API version (e.g. 20.3, 20.5)
  • Linux version
  • File that you are trying to convert
  • What is the expected output file format?

API version: 20.6
Linux version: Ubuntu 18.04
File I’m trying to convert: All of the available files in the “Resources” folder, included with the examples. Executing any of the conversion functions inside the “RunExamples.cs” file raises the error.
Expected output: Various, some of them are PNG, PDF, DOCX.

@JCEntrena

Please try to run this simple application at your end, let us know if issue persists (you can share a screencast of all the steps, if issue occurs). All you have to do is to pass a source file/path and output file/path in program.cs file.

It’s not possible for me to access that application. Google Drive greets me with this:
captura_1.png (12.0 KB)

Probably because I’m located in the EU.

1 Like

@JCEntrena

Let us know if you can download it from here - DocumentConversionTester.zip (1.0 MB).

I can, thank you. I will try to run it.

1 Like

@atirtahir3 It seems that the app above relies on .NET Framework (v4.6.2), which I’m unable to install in Ubuntu 18.04. Is there a similar app that makes use of .NET Core instead?

@JCEntrena

You can set .NET Framework version to 3 or 3.5. Have a look at the system requirements.
Secondly, we’ve prepared a simple .NET Core application for you. Please download it here.

Thanks for providing that version. When setting the file I want to convert and the output file, I am getting the following error:

Unhandled exception. GroupDocs.Conversion.Exceptions.GroupDocsConversionException: Object reference not set to an instance of an object.

at GroupDocs.Conversion.Converter.Convert(SaveDocumentStreamForFileType document, ConvertedDocumentStream documentCompleted, ConvertOptionsProvider convertOptionsProvider) at GroupDocs.Conversion.Converter.Convert(SaveDocumentStream document, ConvertedDocumentStream documentCompleted, ConvertOptionsProvider convertOptionsProvider) at GroupDocs.Conversion.Converter.Convert(SaveDocumentStream document, ConvertOptions convertOptions) at GroupDocs.Conversion.Converter.Convert(String filePath, ConvertOptions convertOptions) at ConversionTesterCore.Program.Main(String[] args) in path/ConversionTesterCore/ConversionTesterCore/Program.cs:line 14

@JCEntrena

Can you please share a screencast and it must cover the steps that raise this exception? You can share screencast here or upload it to some cloud storage and share it’s link.

Here it is: ScreenCapture.zip (772.8 KB)

1 Like

@JCEntrena

We’re investigating this issue. Your investigation ticket ID is CONVERSIONNET-4009. As there’s any update, you’ll be notified.