Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Generate cropped PDF files for ebook readers.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 .gitignore
Octocat-spinner-32 README.org
Octocat-spinner-32 Rakefile
README.org

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://github.com/okkez/pdf-cropper.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.

OPTIONS = {
  :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.