Hello there,
I’m trying to export images for the documents being compared, and have encountered what appears to be a problem with the Comparer.ConvertToImages method.
I do the comparison
Comparer comparer = new Comparer();
var comparisonResults = comparer.Compare(stream1, stream2, new ComparisonSettings());
I build a temp path like so.
var outputDirectoryName = $"{DateTimeOffset.Now.ToUnixTimeMilliseconds()}-{Guid.NewGuid()}";
var tempDirectoryPath = Path.Combine(Path.GetTempPath(), outputDirectoryName);
then, i create the directory
Directory.CreateDirectory(tempDirectoryPath);
this line of code works
comparisonResults.SaveImages(tempDirectoryPath);
but this line does not,
var pageImages = comparer.ConvertToImages(tempDirectoryPath);
I get an error message like this:
Access to the path 'C:\\Users\\<usernamehere>\\AppData\\Local\\Temp\n2694120781-7fbcbed0-1cb6-4e67-88f2-1e17a1843c2f' is denied.
But it’s not, because if i look in the directory, i can see images the SaveImages method was able to create there.
I’ve tried commenting out the SaveImages method call, specifying a directory and giving that directory read/write access to all users, neither worked.
Any advice would be greatly appreciated.
thanks,
Kirk