We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Use of Page.accept (TextAbsorber.visit) is not Thread-Safe

Using Aspose PDF for Java I discovered that multiple threads cannot access the same document in parallel when using Page.accept. Page.accept calls TextAbsorber.visit which seeks within the parent Document. If this occurs while another page is being processed, text can be dropped or an exception can be thrown.

We were processing each page of a PDF in parallel when we encountered this problem. For the time being we have synchronized use of Page.accept but I thought you might like to know about this limitation.

The closest related post I found to this was this one: Does the latest release of Aspose.Pdf support multithreading?


Thank you for contacting support.

We appreciate your feedback and agree with you that Aspose.PDF for Java supports multi threading as long as one thread works with one document. Therefore, one may split each page of a document to a separate document in the memory and proceed further accordingly.