Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Generate cropped PDF files for ebook readers.
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore Add ignore patterns Add install prawn
Rakefile fix task description

PDF Cropper

PDF Cropper is a command line tool to generate cropped PDF for ebook readers.

How to install

Install prawn and clone git repository.

$ gem install prawn
$ git clone git://

How to use

Copy your PDF files to current directory like below.

$ ls
Rakefile  hoge.pdf fuga.pdf

Execute command below.

$ rake

How to customize

Edit Rakefile. Specify crop size as percentage.

:skip means that skip given pages. Page number is one origin.

  :left   => 13.0,
  :right  => 13.0,
  :top    => 10.0,
  :bottom => 5.0,
  :skip   => [1],

The default settings are optimized for O’Reilly Japan’s ebook.

Task list

$ rake -T
rake clean       # Remove any temporary products.
rake clobber     # Remove any generated file.
rake crop        # Crop pdf file in current directory.
rake crop_force  # Force crop pdf file in current directory.
Something went wrong with that request. Please try again.