]> git.sur5r.net Git - pdfstitch/blob - README.md
Improve preview overlay usability
[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 It has been created to print sewing patterns distributed as A4 or Letter PDFs on a large format printer
9 thus saving oneself the hassle of cutting and gluing individual pages.
10
11 ## License
12 `pdfstitch` is free software under the GNU AGPL version 3. See `LICENSE` for details.
13
14 ## Dedication
15
16 `pdfstitch` is dedicated to the memory of Janka "marsi" Kuhfuß.
17
18 ## Dependencies
19
20 `pdfstitch` makes use of the following Perl modules:
21
22 * File::Basename (part of perl base)
23 * File::LibMagic
24 * Getopt::Long (part of perl base)
25 * PDF::API2
26 * YAML
27
28 On Debian, you can install them with:
29
30 `# apt install libfile-libmagic-perl libpdf-api2-perl libyaml-perl`
31
32 On FreeBSD, you can install them with:
33
34 `# pkg install p5-File-LibMagic p5-PDF-API2 p5-YAML`
35
36 ## Usage
37
38 1. Run `pdfstitch` on your input PDF:
39
40    `./pdfstitch [--genmeta] [--defaultcrop=0.9] foobar.pdf`
41
42    This will generate a YAML file called `foobar.pdf.stitch`. Edit this file according to the desired output.
43    This is also the default action if called with a PDF. Per default 10% (factor 0.9) is applied as crop factor.
44    You can adjust this value with the --defaultcrop parameter.
45
46 2. Optional: Generate a preview and/or cropped PDF:
47
48    `./pdfstitch --preview foobar.pdf.stitch`
49
50    This will generate a new PDF called `foobar-preview.pdf`.
51    It contains only the pages you select in the YAML file with each page being overlayed with a transparent box
52    showing the area the page will be cropped to.
53
54    `./pdfstitch --crop foobar.pdf.stitch`
55
56    This will generate a new PDF called `foobar-cropped.pdf`.
57    It contains only the pages you select in the YAML file with each page being cropped accordingly.
58
59 3. Generate the final stitched PDF:
60
61    `./pdfstitch --stitch foobar.pdf.stitch`
62
63    This will generate a single-page PDF called `foobar-stitched.pdf` with all selected pages being
64    stitched together as specified in the YAML file.
65    This is also the default action if called with just a YAML file.
66
67 ## Notes
68
69 * The output file name is based on the .stitch file name.
70 * All output files are placed in the current working directory.