Name | pdf-pagemerge JSON |
Version |
0.0.1
JSON |
| download |
home_page | None |
Summary | Tool for encased python script environment. |
upload_time | 2025-07-09 07:29:52 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
license | BSD 3-Clause License
Copyright (c) 2025, Nanigashi Uji
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
keywords |
development
pdf
template
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Pdf_merge_multipages
Script for layout change of PDF file by merging multiple pages into single page w/o margin.
## Requirement
- Python: tested with version 3.11
- pypdf: https://pypi.org/project/pypdf/
- Tested with version 3.16.2
## Usage
```
usage: pdf_pagemerge.py [-h] [-output filename] [-columns n_h] [-lines n_v] [-page-order opt]
[-rotation opt] [-valign opt] [-align opt] [-metainfo opt] [-title text]
input-file [input-file ...]
Merge multiple mages in PDF files w/o gap.
positional arguments:
input-file Input PDF file(s)
optional arguments:
-h, --help show this help message and exit
-output filename Output file
-columns n_h # of columns of merged pages (default = 2)
-lines n_v # of lines of merged pages (default = 1)
-page-order opt Page order (choices=left2right[default], left2bottom, right2left, right2bottom)
-rotation opt Page orientation (choices=none[default], flip, right, left, auto, rauto)
-valign opt Page fitting (choices=resize, none[default], top, bottom, center, fit)
-align opt Page fitting (choices=resize, none[default], right, left, center, fit)
-metainfo opt Meta data for marged file (choices=full[default], none, partial, short)
-title text set title in meta data for marged file (Default: output file name)
```
## Options
- `-output filename`: Filename of the output file. (Default: `a.out.pdf`)
- `-columns nh`, `-lines n_v`: Output page layout. Each pages in input pdf files will be arranged into `n_h` columns × `n_v` lines in a output page. (Default: n_h=2 × n_v=1 ("2up") )
- `-page-order option`: Order of the sub-Page layout.
- `left2right`: Top line will be filled with sub-pages from left to right at first. Then, next lower lines will be filled with sub-pages.
- `left2bottom`: Most left columns will be filled with sub-pages from top to bottom at first. Then, next right columns will be filled with sub-pages.
- `left2top`: Most left columns will be filled with sub-pages from bottom to to at first. Then, next right columns will be filled with sub-pages.
- `right2left`: Top line will be filled with sub-pages from right to left at first. Then, next lower lines will be filled with sub-pages.
- `right2bottom`: Most right columns will be filled with sub-pages from top to bottom at first. Then, next left columns will be filled with sub-pages.
- `right2top`: Most right columns will be filled with sub-pages from bottom to top at first. Then, next left columns will be filled with sub-pages.
- `-rotation option`: Sub-Page orientation
- `none`: Each sub-pages will be located with original orientation. (Default)
- `flip`: Each sub-pages will be rotated by 180-deg.
- `right`: Each sub-pages will be rotated 90-deg counterclockwise.
- `left`: Each sub-pages will be rotated 90-deg clockwise.
- `auto`: If the first sub-page is in an output pageportrait (landscape), only the landscape (portrait) subpages in a same output page will be rotated by 90-deg counterclockwise.
- `rauto`: If the first sub-page in an output page is portrait (landscape), only the landscape (portrait) subpages in a same output page will be rotated by 90-deg clockwise.
- `-valign opttion`: Adjustment of vertical position of sub-pages.
- `none`,`bottom`: Align the bottom of sub-pages for each lines (Default)
- `center`: Align the vertical center of sub-pages for each lines (Default)
- `top`: Align the top of sub-pages for each lines (Default)
- `resize`: Shrink the sub-page size with its height become same as that for the first sub-page in a same output page. If this option is specified with `-algin resize` or `-algin fit`, much smaller scale factor may be applied, but the vertical sub-page spacing is same as the height of the first sub-page in the page.
- `fit`: Shrink the sub-page size with its height become same as that for the first sub-page in a same output page. If this option is specified with `-algin resize` or `-algin fit`, much smaller scale factor may be applied, and the vertical sub-page spacing may also become less than the height of the first sub-page in the page.
- `-align opttion`: Adjustment of horizontal position of sub-pages.
- `none`,`left`: Align the right of sub-pages for each columns (Default)
- `center`: Align the horizontal center of sub-pages for each columns
- `right`: Align the left of sub-pages for each columns
- `resize`: Shrink the sub-page size with its width become same as that for the first sub-page in a same output page. If this option is specified with `-valgin resize` or `-valgin fit`, much smaller scale factor may be applied, but the horizontal sub-page spacing is same as the width of the first sub-page in the page.
- `fit`: Shrink the sub-page size with its width become same as that for the first sub-page in a same output page. If this option is specified with `-valgin resize` or `-valgin fit`, much smaller scale factor may be applied, and the horizontal sub-page spacing may also become less than the width of the first sub-page in the page.
- `-metainfo options`: Meta-data (document info) of output PDF file.
- `full`: Meta-data will be generated by concatenating the metadata (document info) of input PDF Files. (default)
- `partial`: Meta-data will be partially generated by concatenating the metadata (document info) of input PDF Files.
- `short`: Limted metadata ('/Title'、'/Creater', and '/Producer') will be generated shortly.
- `none`: No meta-data is generated.(Defalut values of `PyPDF2` will be used.)
- `-title text`: Specify the title field of the metadata for output PDF file. (Default is the output file name)
## Author
Nanigashi Uji (53845049+nanigashi-uji@users.noreply.github.com)
Nanigashi Uji (4423013-nanigashi_uji@users.noreply.gitlab.com)
Raw data
{
"_id": null,
"home_page": null,
"name": "pdf-pagemerge",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": "Nanigashi Uji <53845049+nanigashi-uji@users.noreply.github.com>, Nanigashi Uji <4423013-nanigashi_uji@users.noreply.gitlab.com>",
"keywords": "development, pdf, template",
"author": null,
"author_email": "Nanigashi Uji <53845049+nanigashi-uji@users.noreply.github.com>, Nanigashi Uji <4423013-nanigashi_uji@users.noreply.gitlab.com>",
"download_url": "https://files.pythonhosted.org/packages/a4/c3/9efc683fbad5ab849ae5fb7fc5cd589d0d9da1f7b1ff597ba8d47189258a/pdf_pagemerge-0.0.1.tar.gz",
"platform": null,
"description": "# Pdf_merge_multipages\n\nScript for layout change of PDF file by merging multiple pages into single page w/o margin.\n\n## Requirement\n\n- Python: tested with version 3.11\n- pypdf: https://pypi.org/project/pypdf/\n - Tested with version 3.16.2 \n\n## Usage\n\n```\nusage: pdf_pagemerge.py [-h] [-output filename] [-columns n_h] [-lines n_v] [-page-order opt]\n [-rotation opt] [-valign opt] [-align opt] [-metainfo opt] [-title text]\n input-file [input-file ...]\n\nMerge multiple mages in PDF files w/o gap.\n\npositional arguments:\n input-file Input PDF file(s)\n\noptional arguments:\n -h, --help show this help message and exit\n -output filename Output file\n -columns n_h # of columns of merged pages (default = 2)\n -lines n_v # of lines of merged pages (default = 1)\n -page-order opt Page order (choices=left2right[default], left2bottom, right2left, right2bottom)\n -rotation opt Page orientation (choices=none[default], flip, right, left, auto, rauto)\n -valign opt Page fitting (choices=resize, none[default], top, bottom, center, fit)\n -align opt Page fitting (choices=resize, none[default], right, left, center, fit)\n -metainfo opt Meta data for marged file (choices=full[default], none, partial, short)\n -title text set title in meta data for marged file (Default: output file name)\n```\n\n## Options\n\n - `-output filename`: Filename of the output file. (Default: `a.out.pdf`)\n - `-columns nh`, `-lines n_v`: Output page layout. Each pages in input pdf files will be arranged into `n_h` columns \u00d7 `n_v` lines in a output page. (Default: n_h=2 \u00d7 n_v=1 (\"2up\") )\n - `-page-order option`: Order of the sub-Page layout. \n - `left2right`: Top line will be filled with sub-pages from left to right at first. Then, next lower lines will be filled with sub-pages.\n - `left2bottom`: Most left columns will be filled with sub-pages from top to bottom at first. Then, next right columns will be filled with sub-pages.\n - `left2top`: Most left columns will be filled with sub-pages from bottom to to at first. Then, next right columns will be filled with sub-pages.\n - `right2left`: Top line will be filled with sub-pages from right to left at first. Then, next lower lines will be filled with sub-pages.\n - `right2bottom`: Most right columns will be filled with sub-pages from top to bottom at first. Then, next left columns will be filled with sub-pages.\n - `right2top`: Most right columns will be filled with sub-pages from bottom to top at first. Then, next left columns will be filled with sub-pages.\n - `-rotation option`: Sub-Page orientation\n - `none`: Each sub-pages will be located with original orientation. (Default)\n - `flip`: Each sub-pages will be rotated by 180-deg.\n - `right`: Each sub-pages will be rotated 90-deg counterclockwise.\n - `left`: Each sub-pages will be rotated 90-deg clockwise.\n - `auto`: If the first sub-page is in an output pageportrait (landscape), only the landscape (portrait) subpages in a same output page will be rotated by 90-deg counterclockwise. \n - `rauto`:\u3000If the first sub-page in an output page is portrait (landscape), only the landscape (portrait) subpages in a same output page will be rotated by 90-deg clockwise. \n - `-valign opttion`: Adjustment of vertical position of sub-pages.\n - `none`,`bottom`: Align the bottom of sub-pages for each lines (Default)\n - `center`: Align the vertical center of sub-pages for each lines (Default)\n - `top`: Align the top of sub-pages for each lines (Default)\n - `resize`: Shrink the sub-page size with its height become same as that for the first sub-page in a same output page. If this option is specified with `-algin resize` or `-algin fit`, much smaller scale factor may be applied, but the vertical sub-page spacing is same as the height of the first sub-page in the page. \n - `fit`: Shrink the sub-page size with its height become same as that for the first sub-page in a same output page. If this option is specified with `-algin resize` or `-algin fit`, much smaller scale factor may be applied, and the vertical sub-page spacing may also become less than the height of the first sub-page in the page. \n - `-align opttion`: Adjustment of horizontal position of sub-pages.\n - `none`,`left`: Align the right of sub-pages for each columns (Default)\n - `center`: Align the horizontal center of sub-pages for each columns\n - `right`: Align the left of sub-pages for each columns\n - `resize`: Shrink the sub-page size with its width become same as that for the first sub-page in a same output page. If this option is specified with `-valgin resize` or `-valgin fit`, much smaller scale factor may be applied, but the horizontal sub-page spacing is same as the width of the first sub-page in the page. \n - `fit`: Shrink the sub-page size with its width become same as that for the first sub-page in a same output page. If this option is specified with `-valgin resize` or `-valgin fit`, much smaller scale factor may be applied, and the horizontal sub-page spacing may also become less than the width of the first sub-page in the page. \n - `-metainfo options`: Meta-data (document info) of output PDF file.\n - `full`: Meta-data will be generated by concatenating the metadata (document info) of input PDF Files. (default)\n - `partial`: Meta-data will be partially generated by concatenating the metadata (document info) of input PDF Files. \n - `short`: Limted metadata ('/Title'\u3001'/Creater', and '/Producer') will be generated shortly.\n - `none`: No meta-data is generated.(Defalut values of `PyPDF2` will be used.)\n - `-title text`: Specify the title field of the metadata for output PDF file. (Default is the output file name)\n\n## Author\n Nanigashi Uji (53845049+nanigashi-uji@users.noreply.github.com)\n Nanigashi Uji (4423013-nanigashi_uji@users.noreply.gitlab.com)\n \n",
"bugtrack_url": null,
"license": "BSD 3-Clause License\n \n Copyright (c) 2025, Nanigashi Uji\n All rights reserved.\n \n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n \n 1. Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n \n 2. Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution.\n \n 3. Neither the name of the copyright holder nor the names of its\n contributors may be used to endorse or promote products derived from\n this software without specific prior written permission.\n \n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.",
"summary": "Tool for encased python script environment.",
"version": "0.0.1",
"project_urls": {
"Homepage": "https://github.com/nanigashi-uji/pdf-pagemerge"
},
"split_keywords": [
"development",
" pdf",
" template"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "1d649d57f9964fce102eee947e070895b61877c0c7fcd8692221f24a7dda98c8",
"md5": "9f896503e3169006ff922ed23c397b22",
"sha256": "cb320bdef66ac380a0c33e6bcc25c050fe19ee83440297a11572c3f9069333d1"
},
"downloads": -1,
"filename": "pdf_pagemerge-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9f896503e3169006ff922ed23c397b22",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 9106,
"upload_time": "2025-07-09T07:29:49",
"upload_time_iso_8601": "2025-07-09T07:29:49.024616Z",
"url": "https://files.pythonhosted.org/packages/1d/64/9d57f9964fce102eee947e070895b61877c0c7fcd8692221f24a7dda98c8/pdf_pagemerge-0.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "a4c39efc683fbad5ab849ae5fb7fc5cd589d0d9da1f7b1ff597ba8d47189258a",
"md5": "979bd9686621455ce8ac0637676229f5",
"sha256": "e0b8460465d0029d6a30d334580791d99b833a3f05483116d3d5af5bb7853dee"
},
"downloads": -1,
"filename": "pdf_pagemerge-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "979bd9686621455ce8ac0637676229f5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 4154317,
"upload_time": "2025-07-09T07:29:52",
"upload_time_iso_8601": "2025-07-09T07:29:52.464672Z",
"url": "https://files.pythonhosted.org/packages/a4/c3/9efc683fbad5ab849ae5fb7fc5cd589d0d9da1f7b1ff597ba8d47189258a/pdf_pagemerge-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-09 07:29:52",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "nanigashi-uji",
"github_project": "pdf-pagemerge",
"github_not_found": true,
"lcname": "pdf-pagemerge"
}