0

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?

mercury0114
  • 1,341
  • 2
  • 15
  • 29
  • 3
    You say "without too much code" but you forgot to mention which programming language you want to use. If you don't want to write too much code, you need to use a PDF library, but you forgot to mention which library you want to use. If you want to use iText (Java or C#), see http://stackoverflow.com/questions/29563942 (or maybe also [How to reorder pages in an existing PDF file?](http://developers.itextpdf.com/question/how-reorder-pages-existing-pdf-file) and [How to merge documents correctly?](http://developers.itextpdf.com/question/how-merge-documents-correctly).) – Bruno Lowagie Oct 17 '16 at 04:19
  • I edited the post to tell that I don't care about the language. All I care is a simple way to somehow do it automatically so that I wouldn't need to swap 100 pages manually. Apart from that thanks, I think iText is suitable for my needs. – mercury0114 Oct 18 '16 at 07:49

0 Answers0