• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

README.mdH A D24-Oct-20172 KiB6239

pdfstitchH A D24-Oct-20176.5 KiB220175

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
21On Debian, you can installed them with:
22
23`# apt install libfile-libmagic-perl libpdf-api2-perl libyaml-perl`
24
25On FreeBSD, you can install them with:
26
27`# pkg install p5-File-LibMagic p5-PDF-API2 p5-YAML`
28
29## Usage
30
311. Run `pdfstitch` on your input PDF:
32
33   `./pdfstitch [--genmeta] [--defaultcrop=0.9] 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. Per default 10% (factor 0.9) is applied as crop factor.
37   You can adjust this value with the --defaultcrop parameter.
382. Optional: Generate a preview and/or cropped PDF:
39
40   `./pdfstitch --preview foobar.pdf.stitch`
41
42   This will generate a new PDF called `foobar-preview.pdf`.
43   It contains only the pages you select in the YAML file with each page being overlayed with a transparent box
44   showing the are the page will be cropped to.
45
46   `./pdfstitch --crop foobar.pdf.stitch`
47
48   This will generate a new PDF called `foobar-cropped.pdf`.
49   It contains only the pages you select in the YAML file with each page being cropped accordingly.
504. Generate the final stitched PDF:
51
52   `./pdfstitch --stitch foobar.pdf.stitch`
53
54   This will generated a single-page PDF called `foobar-stitched.pdf` with all selected pages being
55   stitched together as specified in the YAML file.
56   This is also the default action if called with just a meta file.
57
58## Notes
59
60* The output file name is based on the .stitch file name.
61* All output files are placed in the current working directory.
62