Skip to content

Commit 147ad5e

Browse files
committed
Rework into single tool
* Make all actions available from a single tool * Update documentation accordingly * Add licensing information
1 parent 09da6d1 commit 147ad5e

File tree

6 files changed

+840
-159
lines changed

6 files changed

+840
-159
lines changed

LICENSE.txt

Lines changed: 633 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
# pdfstitch
22

3-
`pdfstitch` does a similar job to `pdfnup` but incorporates the following additional features:
3+
`pdfstitch` does a similar job to `pdfnup` but focuses on the following features:
44

55
* Crop pages to a certain size
66
* Adjust the crop position per page
77

8+
## License
9+
`pdfstitch` is free software under the GNU AGPL version 3. See `LICENSE` for details.
10+
811
## Dependencies
912

1013
`pdfstitch` makes use of the following Perl modules:
1114

1215
* File::Basename (part of perl base)
16+
* File::LibMagic
17+
* Getopt::Long (part of perl base)
1318
* PDF::API2
1419
* YAML
1520

@@ -19,21 +24,33 @@ On Debian, you can installed them with:
1924

2025
## Usage
2126

22-
1. Run `genmeta` on your input PDF like so:
27+
1. Run `pdfstitch` on your input PDF:
2328

24-
`./genmeta foobar.pdf`
29+
`./pdfstitch [--genmeta] foobar.pdf`
2530

2631
This will generate a YAML file called `foobar.pdf.stitch`. Edit this file according to the desired output.
27-
2. Optional: Run `genpreview` on that YAML file like so:
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:
2846

29-
`./genpreview foobar.pdf.stitch`
47+
`./pdfstitch --stitch foobar.pdf.stitch`
3048

31-
This will generate a new PDF called `foobar-preview.pdf` containing only the pages you selected
32-
in the YAML file with each page being overlayed with a transparent box showing the area the
33-
page will be cropped to.
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.
3452

35-
3. Optional: Run `gencropped` on the YAML file. This will generate a new PDF called `foobar-cropped.pdf` containing
36-
only the pages you selected in the YAML file with each page being cropped as specified.
37-
4. Run `pdfstitch` on the YAML file. This will generated a single-page PDF called `foobar-stitched.pdf` with all
38-
selected pages being as specified in the YAML file.
53+
## Notes
3954

55+
* The output file name is based on the .stitch file name.
56+
* All output files are placed in the current working directory.

gencropped

Lines changed: 0 additions & 32 deletions
This file was deleted.

genmeta

Lines changed: 0 additions & 44 deletions
This file was deleted.

genpreview

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)