NAME
PDF::Imposition - Perl module to manage the PDF imposition
VERSION
Version 0.01
SYNOPSIS
This module is meant to simplify the so-called imposition, i.e., rearrange the pages of a PDF to get it ready to be printed and folded, with more logical pages placed on the sheet, usually (but not exclusively) on recto and verso.
This is what the routine looks like:
use PDF::Imposition;
my $imposer = PDF::Imposition->new(file => "test.pdf",
outfile => "out.pdf",
# or # suffix => "-imposed",
signature => "40-80",
cover => 0,
schema => "2up");
$imposer->impose;
print "Output left in " . $imposer->outfile;
Please note that you don't pass the PDF dimensions (which are extracted from the source PDF itself by the class, using the very first page: if you want imposition, I do the resonable assumption you have all the pages with the same dimensions).
METHODS
Constructor
new ( file => $file, schema => $schema, ...)
This is the only method provided by this class. The constructor doesn't return itself, but instead load, build and return a PDF::Imposition::Schema subclass object, defaulting to PDF::Imposition::Schema2up (which is assumed to be the most common scenario).
If you prefer, you can load the right class yourself.
Options
- file
-
The input file
- outfile
-
The output file
- suffix
-
The suffix of the output file (don't mix the two options).
- schema
-
The schema to use.
- cover
-
If the last logical page must be placed at the very end, after the blank pages used to pad the signature. (
2up
and2down
only). - signature
-
The signature (integer multiple of four or range):
2up
and2down
only.
AUTHOR
Marco Pessotto, <melmothx at gmail.com>
BUGS
Please report any bugs or feature requests to the author's email. If you find a bug, please provide a minimal example file which reproduces the problem (so I can add it to the test suite).
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc PDF::Imposition
REPOSITORY
https://gitorious.org/perl-pdf-imposition
SEE ALSO
- psutils
-
http://knackered.org/angus/psutils/ (shipped by any decent GNU/Linux distro and in TeXlive!). If you don't bother the PDF->PS->PDF route, it's a great and useful tool which just aged well.
- pdfpages
- pdfjam
-
http://www2.warwick.ac.uk/fac/sci/statistics/staff/academic-research/firth/software/pdfjam/ (buil on the top of psutils)
- ConTeXt
-
http://wiki.contextgarden.net/Imposition
The names of schemas are taken straight from the ConTeXt one, as described in the Book Layouts in context, by Willi Egger, Hans Hagen and Taco Hoekwater, 2011.
TODO
The idea is to provide a wide range of imposition schemas (at least the same provided by ConTeXt). This could require some time. If you want to contribute, feel free to fork the repository and send a pull request or a patch (please include documentation and at some tests).
LICENSE
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.