]> git.sur5r.net Git - pdfstitch/blob - README.md
Add info on how to install dependencies on FreeBSD
[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 On FreeBSD, you can install them with:
26
27 `# pkg install p5-File-LibMagic p5-PDF-API2 p5-YAML`
28
29 ## Usage
30
31 1. Run `pdfstitch` on your input PDF:
32
33    `./pdfstitch [--genmeta] foobar.pdf`
34
35    This will generate a YAML file called `foobar.pdf.stitch`. Edit this file according to the desired output.
36    This is also the default action if called with a PDF.
37 2. Optional: Generate a preview and/or cropped PDF:
38
39    `./pdfstitch --preview foobar.pdf.stitch`
40
41    This will generate a new PDF called `foobar-preview.pdf`.
42    It contains only the pages you select in the YAML file with each page being overlayed with a transparent box
43    showing the are the page will be cropped to.
44
45    `./pdfstitch --crop foobar.pdf.stitch`
46
47    This will generate a new PDF called `foobar-cropped.pdf`.
48    It contains only the pages you select in the YAML file with each page being cropped accordingly.
49 4. Generate the final stitched PDF:
50
51    `./pdfstitch --stitch foobar.pdf.stitch`
52
53    This will generated a single-page PDF called `foobar-stitched.pdf` with all selected pages being
54    stitched together as specified in the YAML file.
55    This is also the default action if called with just a meta file.
56
57 ## Notes
58
59 * The output file name is based on the .stitch file name.
60 * All output files are placed in the current working directory.