PyPDFMerge


NamePyPDFMerge JSON
Version 0.0.5 PyPI version JSON
download
home_pagehttps://github.com/shhossain/pdf-merger
SummaryMerge individual pages of PDF file into one page
upload_time2023-10-04 07:42:28
maintainer
docs_urlNone
authorsifat (shhossain)
requires_python>=3.6
license
keywords pdf-merger pdf
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PyPDFMerge

Merge individual pages of PDF files into one page

## Demo

### Merging 2 pages into 1

| Before | After |
|---------|---------|
| ![Image 1](https://raw.githubusercontent.com/shhossain/PyPDFMerge/main/image.png) | ![Image 2](https://github.com/shhossain/PyPDFMerge/raw/main/image-1.png) |


## Installation

```bash
pip install PyPDFMerge
```

**NOTE**: You need visual studio build tools for C++ to install `PyPDFMerge` package. Refer to [this](https://pymupdf.readthedocs.io/en/latest/installation.html#installation-when-a-suitable-wheel-is-not-available) for more information.

## Usage

### Command Line

You can use the `PyPDFMerge` command to merge pdf files. It has the following options:

```bash
pdfmerger <path> [-o <output>] [-g <group_size>] [-q <quality>]
```

Example:

```bash
pdfmerger test.pdf
```

This will merge the `test.pdf` file and save it as `output.pdf` in the same directory.

**NOTE**: Output defaults to `output.pdf`, group size defaults to `2`, and quality defaults to `1.5`.

### Python

You can also use the `PyPDFMerge` package in your Python code. It has the following options:

```python
from pdfmerger import PDFMerge

pdf = PDFMerge(pdf_file=<path>, output_file=<output>, group_size=<group_size>, quality=<quality>, page_number=<page_number>)
pdf.run()
```

Example:

```python
from pdfmerger import PDFMerge

pdf = PDFMerge(pdf_file="./test.pdf", output_file="./output.pdf", group_size=2, quality=1.5)
pdf.run()
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/shhossain/pdf-merger",
    "name": "PyPDFMerge",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "pdf-merger,pdf",
    "author": "sifat (shhossain)",
    "author_email": "<hossain@gmail.com>",
    "download_url": "",
    "platform": null,
    "description": "# PyPDFMerge\r\n\r\nMerge individual pages of PDF files into one page\r\n\r\n## Demo\r\n\r\n### Merging 2 pages into 1\r\n\r\n| Before | After |\r\n|---------|---------|\r\n| ![Image 1](https://raw.githubusercontent.com/shhossain/PyPDFMerge/main/image.png) | ![Image 2](https://github.com/shhossain/PyPDFMerge/raw/main/image-1.png) |\r\n\r\n\r\n## Installation\r\n\r\n```bash\r\npip install PyPDFMerge\r\n```\r\n\r\n**NOTE**: You need visual studio build tools for C++ to install `PyPDFMerge` package. Refer to [this](https://pymupdf.readthedocs.io/en/latest/installation.html#installation-when-a-suitable-wheel-is-not-available) for more information.\r\n\r\n## Usage\r\n\r\n### Command Line\r\n\r\nYou can use the `PyPDFMerge` command to merge pdf files. It has the following options:\r\n\r\n```bash\r\npdfmerger <path> [-o <output>] [-g <group_size>] [-q <quality>]\r\n```\r\n\r\nExample:\r\n\r\n```bash\r\npdfmerger test.pdf\r\n```\r\n\r\nThis will merge the `test.pdf` file and save it as `output.pdf` in the same directory.\r\n\r\n**NOTE**: Output defaults to `output.pdf`, group size defaults to `2`, and quality defaults to `1.5`.\r\n\r\n### Python\r\n\r\nYou can also use the `PyPDFMerge` package in your Python code. It has the following options:\r\n\r\n```python\r\nfrom pdfmerger import PDFMerge\r\n\r\npdf = PDFMerge(pdf_file=<path>, output_file=<output>, group_size=<group_size>, quality=<quality>, page_number=<page_number>)\r\npdf.run()\r\n```\r\n\r\nExample:\r\n\r\n```python\r\nfrom pdfmerger import PDFMerge\r\n\r\npdf = PDFMerge(pdf_file=\"./test.pdf\", output_file=\"./output.pdf\", group_size=2, quality=1.5)\r\npdf.run()\r\n```\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Merge individual pages of PDF file into one page",
    "version": "0.0.5",
    "project_urls": {
        "Bug Report": "https://github.com/shhossain/pdf-merger/issues",
        "Documentation": "https://github.com/shhossain/pdf-merger/blob/main/README.md",
        "Homepage": "https://github.com/shhossain/pdf-merger",
        "Source": "https://github.com/shhossain/pdf-merger"
    },
    "split_keywords": [
        "pdf-merger",
        "pdf"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c4dedd0d86c6bc33f683046d5639b45dd12cd862454c38b594bbf14cf2986a51",
                "md5": "7476237f05ef89b2d443eb7388b9827d",
                "sha256": "6b009aff380bb21542bb32f456760cec7e5fc3b0f8d4db2ae5b7bb364cd61b9b"
            },
            "downloads": -1,
            "filename": "PyPDFMerge-0.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7476237f05ef89b2d443eb7388b9827d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 6972,
            "upload_time": "2023-10-04T07:42:28",
            "upload_time_iso_8601": "2023-10-04T07:42:28.040639Z",
            "url": "https://files.pythonhosted.org/packages/c4/de/dd0d86c6bc33f683046d5639b45dd12cd862454c38b594bbf14cf2986a51/PyPDFMerge-0.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-04 07:42:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "shhossain",
    "github_project": "pdf-merger",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "pypdfmerge"
}
        
Elapsed time: 0.29593s