Possible Duplicate:How do I 'unbook' a pdf I'm not shure that what I have is actually a booklet, or a book. I have a paper in A4-format consisting of 96 pages (plus coverpages). I opened the rivets and fed the paperstack to our copier/scanner. I got a PDF with 50 pages, each in A3 form-factor. The numbering is now like this;46 4748 4544 4950 4342 51...91 1x 9394 xx 9596 tocThe X-es represent a blank page, or foreword or other un-numbered page in the beginning of the paper.I tried the un2up which worked beautifully, except for the page numbering. I tried to figure out the proper way to re-order the pages so I have them in ascending order starting at one. Please help?I also asked this question in How do I 'unbook' a pdf.edit: With un2up and some bash I got it done;#! /bin/bashun2up  ../foo2.pdfpdftk ../foo2.pdf Burstleft=46right=47max=100start=1base=pg_00leftisright=0while [ $start -le $max ] ; do    #echo $left $right    filename=${base}$(printf %02d $start).pdf    mv -i ${filename} out/$(printf %02d ${left}).pdf    start=$(expr $start + 1)    filename=${base}$(printf %02d $start).pdf    mv -i ${filename} out/$(printf %02d ${right}).pdf    tmp=    if [ $leftisright = 0 ] ; then # switch them        tmp=$left        left=$(expr $right + 1)        right=$(expr $tmp - 1 )        leftisright=1    else        tmp=$right        right=$(expr $left + 1) # 47        left=$(expr $tmp - 1) # 46, make left 48!        leftisright=0    fi    start=$(expr $start + 1)doneIt would still be very nice if someone showed me how to do it in python, I got really interested when I first saw un2up. 
How do I unbooklet a PDF-booklet?
pdf;pdftk