When attempting to use pdfbook2 on multiple files simulataneously in a parallelised bash script, pdfbook2 throws a file not found error in line 161 because each launched process uses the same file name for the temporary file. This is defined in line 41:
41 tmpFile = ".crop-tmp.pdf"
Adding the process ID to this temporary file fixes the issue. I suggest replacing line 41 by
41 tmpFile = f".{os.getpid()}.crop-tmp.pdf"
In this way each of the temporary files is unique to each process.
When attempting to use pdfbook2 on multiple files simulataneously in a parallelised bash script, pdfbook2 throws a
file not found
error in line161
because each launched process uses the same file name for the temporary file. This is defined in line41
:41 tmpFile = ".crop-tmp.pdf"
Adding the process ID to this temporary file fixes the issue. I suggest replacing line41
by41 tmpFile = f".{os.getpid()}.crop-tmp.pdf"
In this way each of the temporary files is unique to each process.