X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=README.md;h=da07ebb11ca88e4aa79ecb65d0d68cef4d3bfad9;hb=a34c82897371ea3be74563e7a67f66002b88862c;hp=a20bea74afb41c0a3e34f57b5348546686e82d61;hpb=3404de8b1fd89f7d634744b80596a1bc5c079b37;p=pdfstitch diff --git a/README.md b/README.md index a20bea7..da07ebb 100644 --- a/README.md +++ b/README.md @@ -1,39 +1,56 @@ # pdfstitch -`pdfstitch` does a similar job to `pdfnup` but incorporates the following additional features: +`pdfstitch` does a similar job to `pdfnup` but focuses on the following features: * Crop pages to a certain size * Adjust the crop position per page +## License +`pdfstitch` is free software under the GNU AGPL version 3. See `LICENSE` for details. + ## Dependencies `pdfstitch` makes use of the following Perl modules: * File::Basename (part of perl base) +* File::LibMagic +* Getopt::Long (part of perl base) * PDF::API2 * YAML On Debian, you can installed them with: -`# apt install libpdf-api2-perl libyaml-perl` +`# apt install libfile-libmagic-perl libpdf-api2-perl libyaml-perl` ## Usage -1. Run `genmeta` on your input PDF like so: +1. Run `pdfstitch` on your input PDF: - `./genmeta foobar.pdf` + `./pdfstitch [--genmeta] foobar.pdf` This will generate a YAML file called `foobar.pdf.stitch`. Edit this file according to the desired output. -2. Optional: Run `genpreview` on that YAML file like so: + This is also the default action if called with a PDF. +2. Optional: Generate a preview and/or cropped PDF: + + `./pdfstitch --preview foobar.pdf.stitch` + + This will generate a new PDF called `foobar-preview.pdf`. + It contains only the pages you select in the YAML file with each page being overlayed with a transparent box + showing the are the page will be cropped to. + + `./pdfstitch --crop foobar.pdf.stitch` + + This will generate a new PDF called `foobar-cropped.pdf`. + It contains only the pages you select in the YAML file with each page being cropped accordingly. +4. Generate the final stitched PDF: - `./genpreview foobar.pdf.stitch` + `./pdfstitch --stitch foobar.pdf.stitch` - This will generate a new PDF called `foobar-preview.pdf` containing only the pages you selected - in the YAML file with each page being overlayed with a transparent box showing the area the - page will be cropped to. + This will generated a single-page PDF called `foobar-stitched.pdf` with all selected pages being + stitched together as specified in the YAML file. + This is also the default action if called with just a meta file. -3. Optional: Run `gencropped` on the YAML file. This will generate a new PDF called `foobar-cropped.pdf` containing - only the pages you selected in the YAML file with each page being cropped as specified. -4. Run `pdfstitch` on the YAML file. This will generated a single-page PDF called `foobar-stitched.pdf` with all - selected pages being as specified in the YAML file. +## Notes +* The output file name is based on the .stitch file name. +* All output files are placed in the current working directory.