Issue. The following exception is thrown by Document.Save(string) method if 2 documents are processed simultaneously:
Aspose.Pdf.EmptyValueException: 'ModDate value is empty'.
Code
File.Copy("sample.pdf", "sample-copy.pdf", true);
Task.WaitAll(
Task.Run(() => Test(@"sample.pdf")),
Task.Run(() => Test(@"sample-copy.pdf"))
);
static void Test(string path)
{
var outputPath = path + "-output.pdf";
var pdf = new Document(path);
try
{
pdf.Info.Remove("ModDate");
pdf.Save(outputPath);
}
finally
{
if (File.Exists(outputPath)) File.Delete(outputPath);
}
}
sample.pdf (89.8 KB)
Thanks.
For internal reference: MDP-10125.