I have a pdf document with an even number of pages, say 2n, and I would like to split it into n documents, say pages1_2.pdf, pages3_4.pdf, ....., pages2n-1_2n.pdf, each of which consists of 2 successive pages. More precisely, for any i in the interval {1..2n}, the i-th file should consist of page 2i-1 and page 2i of the original document.

pdftk does not seem to have a dedicated function but a for loop could achieve this.

Could you please help me in writing the right script? Thank you in advance