pdfsquash


Namepdfsquash JSON
Version 0.0.3 PyPI version JSON
download
home_pagehttps://github.com/pgmmpk/pdfsquash
SummaryTool(s) for placing multiple PDF pages on a sheet for printin
upload_time2023-07-08 11:52:36
maintainer
docs_urlNone
authorMike Kroutikov
requires_python
licenseMIT
keywords pdf
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pdfsquash

Tool(s) to transform PDFs for printing multiple pages on a sheet.

## Usage
```bash
pdfsquash -o <output-pdf> <input-pdf-1> <input-pdf-2> ...
```

For more options, see
```bash
pdfsquash -h
```

## Examples
Following PDF files are used as sample inputs:
* [1.pdf](samples/1.pdf)
* [2.pdf](samples/2.pdf)
* [3.pdf](samples/2.pdf)
* [4.pdf](samples/2.pdf)

## Default options
```bash
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](samples/1-4-default.pdf)

![image](https://github.com/pgmmpk/pdfsquash/assets/569458/28bb98eb-813d-48b8-ab1e-3c6c7c9a4358)

## Change spacing between minipages
Default spacing is 0. To chang it to 10pt use this command:
```bash
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](samples/1-4-spacing.pdf)

![image](https://github.com/pgmmpk/pdfsquash/assets/569458/ca524df7-0dc2-4000-b123-6317e38d8437)

## Change page margin
Default page margin is 20pt. To change it to 0pt use this command:
```bash
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](samples/1-4-margin.pdf)

![image](https://github.com/pgmmpk/pdfsquash/assets/569458/e7a10859-c04d-43a0-9b7a-dba1d033507c)

## 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:
```bash
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](samples/1-4-keep-aspect.pdf)

![image](https://github.com/pgmmpk/pdfsquash/assets/569458/13d938db-420e-48ff-b2b5-048f7a05df5f)

## TODO
1. Support other paper sizes (currently hardcoded to US Letter)
2. Support other number of mini-pages per paper sheet (2, 6, 8). Currently do only 4 mini-pages per paper sheet.
3. Support page re-ordering. Currently mini-pages are placed in a fixed order (left-to-right, top-to-bottom).

## License
MIT

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/pgmmpk/pdfsquash",
    "name": "pdfsquash",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "pdf",
    "author": "Mike Kroutikov",
    "author_email": "pgmmpk@gmail.com",
    "download_url": "",
    "platform": null,
    "description": "# pdfsquash\n\nTool(s) to transform PDFs for printing multiple pages on a sheet.\n\n## Usage\n```bash\npdfsquash -o <output-pdf> <input-pdf-1> <input-pdf-2> ...\n```\n\nFor more options, see\n```bash\npdfsquash -h\n```\n\n## Examples\nFollowing PDF files are used as sample inputs:\n* [1.pdf](samples/1.pdf)\n* [2.pdf](samples/2.pdf)\n* [3.pdf](samples/2.pdf)\n* [4.pdf](samples/2.pdf)\n\n## Default options\n```bash\npdfsquash -o samples/1-4-default.pdf \\\n    samples/1.pdf samples/2.pdf samples/3.pdf samples/4.pdf\n```\nHere is how result will look: [1-4-default.pdf](samples/1-4-default.pdf)\n\n![image](https://github.com/pgmmpk/pdfsquash/assets/569458/28bb98eb-813d-48b8-ab1e-3c6c7c9a4358)\n\n## Change spacing between minipages\nDefault spacing is 0. To chang it to 10pt use this command:\n```bash\npdfsquash -o samples/1-4-spacing.pdf \\\n    -s 10 \\\n    samples/1.pdf samples/2.pdf samples/3.pdf samples/4.pdf\n```\nHere is how result will look: [1-4-default.pdf](samples/1-4-spacing.pdf)\n\n![image](https://github.com/pgmmpk/pdfsquash/assets/569458/ca524df7-0dc2-4000-b123-6317e38d8437)\n\n## Change page margin\nDefault page margin is 20pt. To change it to 0pt use this command:\n```bash\npdfsquash -o samples/1-4-margin.pdf \\\n    -m 0 \\\n    samples/1.pdf samples/2.pdf samples/3.pdf samples/4.pdf\n```\nHere is how result will look: [1-4-default.pdf](samples/1-4-margin.pdf)\n\n![image](https://github.com/pgmmpk/pdfsquash/assets/569458/e7a10859-c04d-43a0-9b7a-dba1d033507c)\n\n## Keep aspect ratio of the original\nBy default, original mini-pages will be shrinked and stretched to fit the target sheet location,\n**independently in X and Y direction***.\nIf you want to preserve original aspect, do this:\n```bash\npdfsquash -o samples/1-4-keep-aspect.pdf \\\n    -m 0 \\\n    -k \\\n    samples/1.pdf samples/2.pdf samples/3.pdf samples/4.pdf\n```\nHere is how result will look: [1-4-keep-aspect.pdf](samples/1-4-keep-aspect.pdf)\n\n![image](https://github.com/pgmmpk/pdfsquash/assets/569458/13d938db-420e-48ff-b2b5-048f7a05df5f)\n\n## TODO\n1. Support other paper sizes (currently hardcoded to US Letter)\n2. Support other number of mini-pages per paper sheet (2, 6, 8). Currently do only 4 mini-pages per paper sheet.\n3. Support page re-ordering. Currently mini-pages are placed in a fixed order (left-to-right, top-to-bottom).\n\n## License\nMIT\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Tool(s) for placing multiple PDF pages on a sheet for printin",
    "version": "0.0.3",
    "project_urls": {
        "Homepage": "https://github.com/pgmmpk/pdfsquash"
    },
    "split_keywords": [
        "pdf"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e91a9c6cd4d1c5c74aab6efa53157850d2fb05d0b4de363968db62f1cdb5b455",
                "md5": "ddd69800a2108cbc8ecbc5ed56087736",
                "sha256": "5fb939e9a9e936816c1b0ada6d29b6d5a304ef655ac7c1b90dfa31ab5b091cf6"
            },
            "downloads": -1,
            "filename": "pdfsquash-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ddd69800a2108cbc8ecbc5ed56087736",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 4615,
            "upload_time": "2023-07-08T11:52:36",
            "upload_time_iso_8601": "2023-07-08T11:52:36.499754Z",
            "url": "https://files.pythonhosted.org/packages/e9/1a/9c6cd4d1c5c74aab6efa53157850d2fb05d0b4de363968db62f1cdb5b455/pdfsquash-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-08 11:52:36",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pgmmpk",
    "github_project": "pdfsquash",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pdfsquash"
}
        
Elapsed time: 1.71737s