Skip to content

Splits apart and re-numbers a multipage pdf of a scanned book.

Notifications You must be signed in to change notification settings

jlevin/pdf_booklet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

pdf_booklet
===========

pdf_booklet is a command-line utility that takes multi-page pdf scans of an unbound book (two pages per page) and returns a pdf with all the pages in the correct order.  In other words, if you took the staples out of a booklet, and fed the whole thing through a scanner, this script would turn that output file into an ordered multipage pdf.  

Dependencies

1. Install pdftk server.  It is used to split apart and re-order pdfs.
   http://www.pdflabs.com/tools/pdftk-server/

2. Install imagemagick.  This is used to manipulate pdf images.  Install using homebrew.  
   brew install imagemagick

3. Install rmagick.  This works with imagemagick via ruby.  Install using rubygems. 
   gem 'rmagick'

4. Install ghostscript, a pdf interpreter.  Install using homebrew.  
   brew install ghostscript

Usage

Move the target pdfs into the same directory as pdf_booklet.rb.  In the terminal type:

	$ ruby pdf_booklet.rb example1.pdf example2.pdf

OR to target all pdfs in that directory

	$ ruby pdf_booklet.rb *.pdf

pdf_booklet will create a new folder called booklets and output files will be placed there.

About

Splits apart and re-numbers a multipage pdf of a scanned book.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages