GroupDocs.Conversion fails if Aspose.Words installed

If you add GroupDocs.Conversion to your project and convert Word document to PDF, everything works fine. If you add Aspose.Words to your project, you get error “GroupDocs.Conversion.Exceptions.CorruptOrDamagedFileException: Cannot convert. The file is corrupt or damaged. Operation is not valid due to the current state of the object.”

Using standard code from sample:

try
{

            using (var converter = new GroupDocs.Conversion.Converter(@".....somefile.DOC"))
            {
                GroupDocs.Conversion.Contracts.PossibleConversions conversions = converter.GetPossibleConversions();

                // Set the convert options for PDF format
                var options = new GroupDocs.Conversion.Options.Convert.PdfConvertOptions();
                // Convert to PDF format
                converter.Convert(@"......\export.pdf", options);
            }
        }
        catch (Exception ex)
        {
            MessageBox.Show(ex.ToString());
        }
1 Like

@NPozdniakov

Please share GroupDocs.Conversion and Aspose.Words APIs versions that you are using in your application.

Most recent from Nuget. Conversion: 23.3.1, Words: 23.4.0

@NPozdniakov

When using any Aspose API with GroupDocs, ensure that you are using the latest version of GroupDocs and an older version of the Aspose APIs (older than the version of GroupDocs being used). For instance, if you are using GroupDocs.Conversion 23.3.1, make sure to use any version of Aspose.Words that is smaller than 23.3.1.

I’m using latest on NuGet. Are there more recent versions?

Understood. Let me try it.

It works.
Kind of odd that I have to do that but now I know.

Thank you.

1 Like

@NPozdniakov

You are welcome.