From Electron Cloud
Revision as of 18:12, 30 August 2009 by Ecloud (Talk | contribs) (Rearranging pages)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Rearranging pages

If one pdf contains left-side pages of a scanned book, and another contains the right-side pages, here's one way to fix it using PDFTK:

(define lastpage 269)
(let loop ([i 0])
        (when (<= i lastpage)
                (printf " A~a B~a" i i)
                (loop (+ 1 i))))

csi genranges.scm > r
vi r (and delete extraneous stuff)
pdftk A=left.pdf B=right.pdf cat `cat r` output c.pdf