Hello,
I recently started testing the GroupDocs.Conversion.Converter but quickly ran into a problem moving or deleting the created file.
Running the sample program with the addition of a File.Delete call at the end results in:
System.IO.IOException: ‘The process cannot access the file ‘…’ because it is being used by another process.’
Sample Code:
string outputFolder = Constants.GetOutputDirectoryPath();
string outputFile = Path.Combine(outputFolder, "converted.pdf");
using (Converter converter = new Converter(Constants.SAMPLE_DOCX))
{
PdfConvertOptions options = new PdfConvertOptions();
converter.Convert(outputFile, options);
}
File.Delete(outputFile);
I was attempting the same thing using the Viewer which works fine.
Can someone please help?