]> git.sur5r.net Git - pdfstitch/blob - README.md
Add dedication
[pdfstitch] / README.md
1 # pdfstitch
2
3 `pdfstitch` does a similar job to `pdfnup` but focuses on the following features:
4
5 * Crop pages to a certain size
6 * Adjust the crop position per page
7
8 ## License
9 `pdfstitch` is free software under the GNU AGPL version 3. See `LICENSE` for details.
10
11 ## Dedication
12
13 `pdfstitch` is dedicated to the memory of Janka Kuhfuß.
14
15 ## Dependencies
16
17 `pdfstitch` makes use of the following Perl modules:
18
19 * File::Basename (part of perl base)
20 * File::LibMagic
21 * Getopt::Long (part of perl base)
22 * PDF::API2
23 * YAML
24
25 On Debian, you can installed them with:
26
27 `# apt install libfile-libmagic-perl libpdf-api2-perl libyaml-perl`
28
29 On FreeBSD, you can install them with:
30
31 `# pkg install p5-File-LibMagic p5-PDF-API2 p5-YAML`
32
33 ## Usage
34
35 1. Run `pdfstitch` on your input PDF:
36
37    `./pdfstitch [--genmeta] [--defaultcrop=0.9] foobar.pdf`
38
39    This will generate a YAML file called `foobar.pdf.stitch`. Edit this file according to the desired output.
40    This is also the default action if called with a PDF. Per default 10% (factor 0.9) is applied as crop factor.
41    You can adjust this value with the --defaultcrop parameter.
42 2. Optional: Generate a preview and/or cropped PDF:
43
44    `./pdfstitch --preview foobar.pdf.stitch`
45
46    This will generate a new PDF called `foobar-preview.pdf`.
47    It contains only the pages you select in the YAML file with each page being overlayed with a transparent box
48    showing the are the page will be cropped to.
49
50    `./pdfstitch --crop foobar.pdf.stitch`
51
52    This will generate a new PDF called `foobar-cropped.pdf`.
53    It contains only the pages you select in the YAML file with each page being cropped accordingly.
54 4. Generate the final stitched PDF:
55
56    `./pdfstitch --stitch foobar.pdf.stitch`
57
58    This will generated a single-page PDF called `foobar-stitched.pdf` with all selected pages being
59    stitched together as specified in the YAML file.
60    This is also the default action if called with just a meta file.
61
62 ## Notes
63
64 * The output file name is based on the .stitch file name.
65 * All output files are placed in the current working directory.