Previously, it wasn't possible to use pdfOffice in parallel due to certain limitations in the library. Files were sequentially processed, regardless of whether threads were being used during processing or not. In pdfOffice version 2.0.3, the multithreading handler which locked parallel conversions was removed and true multithreading was enabled by using Java's
ThreadLocal API along with some refactoring to reduce non-final statics.
How it works
To use the multithreading functionality, all you need to do is to call one of the
OfficeConverter#convertOfficeDocumentToPdf overloads (Java) inside 2 or more separate threads and the conversion will happen concurrently. Below you can find a simple example method to show how you could create threads to run concurrently. During testing with simple mock files and 2 threads, we already noticed an increase in performance of 14% but optimization results will, naturally, be dependent on several environmental factors such as hardware, input files, JVM warmup, and other factors.
Want high-quality Office to PDF conversion, but don't use Java?