How to transform 2xA5 scans in 1xA4

[DISCLAIMER] Does not work (yet). Some issues with the PATH. More to come.

Issue: You have scanned a A5 format book flat open on the A4 scanner bed. You therefore have a pdf book of landscape A4 pages, each containing 2xA5 pages side by side. How can you switch to a A4 format with one (book) pageper (pdf) page, and in portrait orientation?

  1. install LaTeX (texlive is the package available for ubuntu) latest version (TeX Live 2011)

    sudo apt-add-repository ppa:texlive-backports/ppa
    sudo apt-get update
    sudo apt-get install texlive

  2. install PDFjam

    sudo apt-get install pdfjam

  3. install pdftex

    sudo wget ~/Downloads/
    sudo tar -xvf ~/Downloads/pdftex-1.40.10.tar.bz2
    sudo mkdir /usr/share/texmf/tex/latex/pdftex-1.40.10
    sudo mv ~/Downloads/pdftex-1.40.10/ usr/share/texmf/tex/latex/pdftex-1.40.10

  4. install eso-pic

    sudo wget ~/Downloads/
    sudo unzip -d ~/Downloads/contrib/

    sudo mkdir /usr/share/texmf/tex/latex/eso-pic
    sudo mv ~/Downloads/eso-pic/ usr/share/texmf/tex/latex/eso-pic/

  5. install eso-piceveryshi

    sudo wget ~/Downloads/
    sudo unzip -d ~/Downloads/contrib/
    sudo mkdir /usr/share/texmf/tex/latex/ms
    sudo mv ~/Downloads/ms/ usr/share/texmf/tex/latex/ms/

  6. install pdfpages

    sudo wget ~/Downloads/
    sudo unzip -d ~/Downloads/contrib/
    sudo mkdir /usr/share/texmf/tex/latex/pdfpages
    sudo mv ~/Downloads/pdfpages/ usr/share/texmf/tex/latex/pdfpages/

  7. install pdfnup-gui (1.0.2)

    sudo wget ~/Downloads/
    sudo tar -xvf ~/Downloads/134874-pdfnup-gui.tar.gz
    cd ~/Downloads/pdfnup-gui/
    sudo make install

  8. Also add PATH