pdfsquash
Tool(s) to transform PDFs for printing multiple pages on a sheet.
Usage
pdfsquash -o <output-pdf> <input-pdf-1> <input-pdf-2> ...
For more options, see
pdfsquash -h
Examples
Following PDF files are used as sample inputs:
Default options
pdfsquash -o samples/1-4-default.pdf \
samples/1.pdf samples/2.pdf samples/3.pdf samples/4.pdf
Here is how result will look: 1-4-default.pdf
Change spacing between minipages
Default spacing is 0. To chang it to 10pt use this command:
pdfsquash -o samples/1-4-spacing.pdf \
-s 10 \
samples/1.pdf samples/2.pdf samples/3.pdf samples/4.pdf
Here is how result will look: 1-4-default.pdf
Change page margin
Default page margin is 20pt. To change it to 0pt use this command:
pdfsquash -o samples/1-4-margin.pdf \
-m 0 \
samples/1.pdf samples/2.pdf samples/3.pdf samples/4.pdf
Here is how result will look: 1-4-default.pdf
Keep aspect ratio of the original
By default, original mini-pages will be shrinked and stretched to fit the target sheet location, independently in X and Y direction*. If you want to preserve original aspect, do this:
pdfsquash -o samples/1-4-keep-aspect.pdf \
-m 0 \
-k \
samples/1.pdf samples/2.pdf samples/3.pdf samples/4.pdf
Here is how result will look: 1-4-keep-aspect.pdf
TODO
- Support other paper sizes (currently hardcoded to US Letter)
- Support other number of mini-pages per paper sheet (2, 6, 8). Currently do only 4 mini-pages per paper sheet.
- Support page re-ordering. Currently mini-pages are placed in a fixed order (left-to-right, top-to-bottom).
License
MIT
Metadata
Release files for pdfsquash 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pdfsquash-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for pdfsquash-0.0.3-py3-none-any.whl |
Release files / pdfsquash-0.0.3-py3-none-any.whl
| Download URL | pdfsquash-0.0.3-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5fb939e9a9e936816c1b0ada6d29b6d5a304ef655ac7c1b90dfa31ab5b091cf6
|
|
BLAKE2b-256 checksum How to use checksums |
e91a9c6cd4d1c5c74aab6efa53157850d2fb05d0b4de363968db62f1cdb5b455
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Security for pdfsquash 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.