Is Document.Convert() to pdf/a1a is a thread safe method call

"When using Aspose.Pdf version 23.10.0 to convert to pdf/a1a like so:

using var logStream = new MemoryStream();
var options = new PdfFormatConversionOptions( PdfFormat.PDF_A_1A ){ LogStream = logStream };
using var document = new Aspose.Pdf.Document( myPdfMemoryStream );
document.Convert( options );

The file C:\Windows\system32\ConversionLog.xml is produced automatically by the component. Is there a way to prevent this file from being produced? Performing a conversion simultaneously using two or more threads (or processes) produces lock contention for that file, so Document.Convert() to pdf/a1a appears to not be a thread safe method call as it produces the error below:

The process cannot access the file ‘C:\Windows\system32\ConversionLog.xml’ because it is being used by another process
Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable1 unixCreateMode) at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable1 unixCreateMode)
at Aspose.Pdf.PdfFormatConversionOptions.#=zdzTl_P3xHggv()
at Aspose.Pdf.Document.#=znlwNvPM=(PdfFormatConversionOptions #=ze_om$e0=, Boolean #=zOSwyATArvdiD)
at Crawfordtech.Documents.Converter.SetPdfFormat(String outputFormat, MemoryStream pdf)"

Is there a way we can work around this?

@hedwards

This case needs to be investigated in details. Can you please share the complete error stack trace along with the details of your environment e.g. application type, OS Name, etc? We will log an investigation ticket and share the ID with you.

14288_stacktrace.zip (1.3 KB)

The application runs as a service and transforms docs, tiffs, etc. to PDF. OS is Windows Server 2019.

Should I have entered this as a paid support ticket as I don’t have it reproduced outside our main application (can’t share code).

@hedwards

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFNET-56075

You can surely create a topic in the paid support in case you need to raise the issue priority. You can create a post there with the reference of above ticket ID and the issue will be dealt accordingly.