Aspose.Pdf.Generator.Pdf - Thread safety

Hi!

I just want to know if the Aspose-Products (especially Aspose.Pdf.Generator.Pdf) are thread safe?

Because im creating a lot of Pdfs in different threads - every thread calls a static void which creates a PdfCreatror Object (new Aspose.Pdf.Generator.Pdf():wink: - If i do so sometimes i ran into a ArgumentException at this point (ExceptionMessage like: An element with the same key already exists in the [Dictionary<TKey, TValue>].) - Is it possible to avoid this? - currently i have to use the “lock” statement to prevent that error - but unfortunately i have to “lock” at other parts of my code when i’m using Aspose-PDF components too. This does a big performance impact on my threaded solution.

So generally - are Aspose.PDF-Components threadsafe?

Best Regards

Johannes

Hi Johannes,


Thanks for contacting support.

Aspose.Pdf for .NET is thread safe, provided that a single PDF file is not being accessed by more than one threads at a time.