]> git.sur5r.net Git - pdfstitch/blob - README.md
BSD friendly shebang
[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 ## Dependencies
12
13 `pdfstitch` makes use of the following Perl modules:
14
15 * File::Basename (part of perl base)
16 * File::LibMagic
17 * Getopt::Long (part of perl base)
18 * PDF::API2
19 * YAML
20
21 On Debian, you can installed them with:
22
23 `# apt install libfile-libmagic-perl libpdf-api2-perl libyaml-perl`
24
25 ## Usage
26
27 1. Run `pdfstitch` on your input PDF:
28
29    `./pdfstitch [--genmeta] foobar.pdf`
30
31    This will generate a YAML file called `foobar.pdf.stitch`. Edit this file according to the desired output.
32    This is also the default action if called with a PDF.
33 2. Optional: Generate a preview and/or cropped PDF:
34
35    `./pdfstitch --preview foobar.pdf.stitch`
36
37    This will generate a new PDF called `foobar-preview.pdf`.
38    It contains only the pages you select in the YAML file with each page being overlayed with a transparent box
39    showing the are the page will be cropped to.
40
41    `./pdfstitch --crop foobar.pdf.stitch`
42
43    This will generate a new PDF called `foobar-cropped.pdf`.
44    It contains only the pages you select in the YAML file with each page being cropped accordingly.
45 4. Generate the final stitched PDF:
46
47    `./pdfstitch --stitch foobar.pdf.stitch`
48
49    This will generated a single-page PDF called `foobar-stitched.pdf` with all selected pages being
50    stitched together as specified in the YAML file.
51    This is also the default action if called with just a meta file.
52
53 ## Notes
54
55 * The output file name is based on the .stitch file name.
56 * All output files are placed in the current working directory.