In order for the pages of a book to have the correct order, a bit of mathematics is required. To print the “signatures” (sheets) of a book correctly, software that you have to pay for is usually necessary – alternatively, I provide a script that does exactly that.
It processes a PDF and generates a new PDF from it, which can then be printed directly using double-sided duplex printing (four pages per sheet – two on the front, two on the back).
You can simply specify how many sheets you want to bind per signature, and the script prepares everything accordingly.
It also has a “Manga” mode to prepare books that are read “back to front” (according to Western standards) for printing, and includes parameters to trim page margins.