I have recently scanned lecture notes containing pages 1, 2, ..., 100. Since the scanner only operates on one side of the page, I did it in two rounds.
The first round gave me a PDF document containing pages 1, 3, ..., 99 in this order.
In the second round I turned the notes around and the scanning procedure gave me pages 100, 98, ..., 2 in this (reversed) order.
I would like to automatically merge two files so that the resulting file contains pages 1, 2, ... 100 in the normal order. More generally, I am looking for a Combine
function operating on PDF documents, such that
Combine([1, 3, ..., 2n-1], [2n, 2n-2, ..., 2]) = [1, 2, ..., 2n]
What would be an easy way to do this without writing too much code? The language, library and other implementation details do not matter for me. All I care is to find an automatic way for swapping 100 pages, so that I would not need to do that manually. However, writing 1000 lines of code would be an overkill for such task. Hence, I am searching for a good compromise. Any advice?