Deploying GroupDocs and Aspose.Pdf


#1

We are getting an error when trying to run the conversion of documents to pdf using groupdocs conversion. we have groupdocs.conversion.dll 18.7 and have Aspose.pdf.dll 11.2 deployed. We are running the code in IIS and get an error every time we try to convert documents.


#2

@karlscales,

Thank you for taking interest in GroupDocs.Conversion for .NET and posting your concerns.
In order to investigate the issue at our end, we need following details from you:

  • Error/exception details
  • Problematic file/document
  • Sample code project using that we can reproduce the issue, we would prefer a simplified project without any dependencies

#3

is the error we are getting:
{“The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)”:null}

feel it is from the groupdocs dll

is the code in question :
public static string ConvertToPdfAsPath(String fileName, String originalFileName, String fileLocationPath, ConversionHandler conversionHandler, SaveOptions saveOptions, Boolean isCombinedDocument) {
//ExStart:ConvertToPdfAsPath
if (conversionHandler == null) {
// Instantiating the conversion handler from custom common class
conversionHandler = Common.getConversionHandler(fileLocationPath);
}

        // Convert and save converted Pdf documents.
        // Returns paths to the converted Pdf documents.
        var convertedDocumentPath = conversionHandler.Convert(fileName, saveOptions);
        var convertedDocumentName = String.Empty;

        if (!isCombinedDocument) {
            convertedDocumentName = originalFileName + ".pdf";
        } else {
            convertedDocumentName = originalFileName + "_icb" + ".pdf";
        }

        convertedDocumentPath.Save(convertedDocumentName);
        convertedDocumentPath.Dispose();

        var resultDocumentPath = Path.Combine(fileLocationPath, convertedDocumentName);
        return resultDocumentPath;
    }

#4

@karlscales,

This issue appears due to mismatch between assemblies. Please make sure (through the Properties of GroupDocs.Conversion and Aspose.PDF references) that the correct version is chosen. Also make sure that your project name doesn’t conflict with either of the references names.

In order to further dig down the issue, can you please remove Aspose.PDF reference and see if the issue persists? Please share a sample project using that we could reproduce the issue at our end.