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());
}