| 1 |
pdfbook2 - transform pdf files to booklets |
| 2 |
========================================== |
| 3 |
|
| 4 |
pdfbook2 v1.4 (https://github.com/jenom/pdfbook2) |
| 5 |
(c) 2015 - 2020 Johannes Neumann (http://www.neumannjo.de) |
| 6 |
licensed under GPLv3 (http://www.gnu.org/licenses/gpl-3.0) |
| 7 |
based on pdfbook by David Firth with help from Marco Pessotto |
| 8 |
|
| 9 |
DESCRIPTION |
| 10 |
|
| 11 |
Create print-ready PDF files from some INPUT PDF files for booklet printing. |
| 12 |
The resulting files need to be printed in landscape/long edge double sided |
| 13 |
printing. The default paper format depends on the locale and is choosen by |
| 14 |
pdfjam. It can be set with the --paper option. |
| 15 |
|
| 16 |
Before the pdf is composed the INPUT file is cropped to the relevant area in |
| 17 |
order to discard unnecessary white spaces. In this process, all pages are |
| 18 |
cropped to the same dimensions. Extra margins can be defined at the edges of |
| 19 |
the booklet and in the middle where the binding occurs. |
| 20 |
|
| 21 |
The OUTPUT is written to INPUT-book.pdf. Existing files will be overwritten. |
| 22 |
All input files are processed seperatly. |
| 23 |
|
| 24 |
LICENSE |
| 25 |
|
| 26 |
This program is free software: you can redistribute it and/or modify it |
| 27 |
under the terms of the GNU General Public License as published by the Free |
| 28 |
Software Foundation, either version 3 of the License, or (at your option) |
| 29 |
any later version. |
| 30 |
|
| 31 |
This program is distributed in the hope that it will be useful, but WITHOUT |
| 32 |
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 33 |
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
| 34 |
more details. You should have received a copy of the GNU General Public |
| 35 |
License along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 36 |
|
| 37 |
INSTALLATION |
| 38 |
|
| 39 |
Simply copy the file to any convenient location preferably covered by the |
| 40 |
PATH variable of your shell. Make sure it is set as executable like |
| 41 |
|
| 42 |
chmod +x pdfbook2 |
| 43 |
|
| 44 |
for unix like systems. |
| 45 |
|
| 46 |
REQUIREMENTS |
| 47 |
|
| 48 |
python 3.6, pdfjam, pdfcrop and their dependencies. |
| 49 |
|
| 50 |
EXAMPLES |
| 51 |
|
| 52 |
To simply create a booklet from input.pdf you can use |
| 53 |
|
| 54 |
pdfbook2 input.pdf |
| 55 |
|
| 56 |
to create input-book.pdf. To select a special type of paper you can do |
| 57 |
|
| 58 |
pdfbook2 --paper=letter input.pdf |
| 59 |
|
| 60 |
for letter or |
| 61 |
|
| 62 |
pdfbook2 --paper=a4paper input.pdf |
| 63 |
|
| 64 |
for standard A4. To increase the inner margin for binding use |
| 65 |
|
| 66 |
pdfbook2 --inner-margin=200 input.pdf |
| 67 |
|
| 68 |
to increase the default value of 150. You can submit multiple files to the |
| 69 |
script for processing like |
| 70 |
|
| 71 |
pdfbook2 input1.pdf input2.pdf |
| 72 |
|
| 73 |
which will result in input1-book.pdf and input2-book.pdf. |
| 74 |
|
| 75 |
USAGE |
| 76 |
|
| 77 |
pdfbook2 [options] file1 [file2 ...] |
| 78 |
|
| 79 |
OPTIONS |
| 80 |
|
| 81 |
--version show program's version number and exit |
| 82 |
--help, -h show this help message and exit |
| 83 |
|
| 84 |
GENERAL |
| 85 |
|
| 86 |
--paper=STR, -p STR |
| 87 |
Format of the output paper dimensions as latex keyword (e.g. |
| 88 |
a4paper, letterpaper, legalpaper, ...) |
| 89 |
--short-edge, -s |
| 90 |
Format the booklet for short-edge double-sided printing |
| 91 |
--no-crop, -n |
| 92 |
Prevent the cropping to the content area |
| 93 |
|
| 94 |
MARGINS |
| 95 |
|
| 96 |
--outer-margin=INT, -o INT |
| 97 |
Defines the outer margin in the booklet (default: 40) |
| 98 |
--inner-margin=INT, -i INT |
| 99 |
Defines the inner margin between the pages in the booklet |
| 100 |
(default: 150) |
| 101 |
--top-margin=INT, -t INT |
| 102 |
Defines the top margin in the booklet (default: 30) |
| 103 |
--bottom-margin=INT, -b INT |
| 104 |
Defines the bottom margin in the booklet (default: 30) |
| 105 |
|
| 106 |
ADVANCED |
| 107 |
|
| 108 |
--signature=INT |
| 109 |
Define the signature for the booklet handed to pdfjam, needs to |
| 110 |
be multiple of 4 (default: 4) |
| 111 |
--signature*=INT |
| 112 |
Same as --signature |
| 113 |
--resolution=INT |
| 114 |
Resolution used by ghostscript in bp (default: 72) |
| 115 |
|
| 116 |
CHANGELOG |
| 117 |
|
| 118 |
1.4 2020/01/20 |
| 119 |
|
| 120 |
- migration to Python 3 |
| 121 |
- fixed bug if the input document had only one page |
| 122 |
- fix for signature option not working |
| 123 |
|
| 124 |
1.3 2019/08/12 |
| 125 |
|
| 126 |
- removed wait after popen to prevent deadlock with very large documents |
| 127 |
|
| 128 |
1.2 2015/06/03 |
| 129 |
|
| 130 |
- added man page |
| 131 |
|
| 132 |
1.1 2015/06/01 |
| 133 |
|
| 134 |
- added resolution, signature, no-crop options |
| 135 |
- better handling of input files with different margins on odd and |
| 136 |
even pages |
| 137 |
- added short options |
| 138 |
- speedup for bound calculations and cropping by setting ghostscript |
| 139 |
resolution to 72 (ref. --resolution option) |
| 140 |
|
| 141 |
1.0 2015/05/27 |
| 142 |
|
| 143 |
- initial version |