{"id":26991650,"url":"https://github.com/jromero132/pdf-merger","last_synced_at":"2025-04-03T22:16:27.334Z","repository":{"id":285757489,"uuid":"958298856","full_name":"jromero132/pdf-merger","owner":"jromero132","description":"A Python utility for merging multiple PDFs and images into a single PDF file. This tool maintains aspect ratios, centers content on custom-sized pages (default A4), and supports recursive directory processing. Perfect for organizing documents and creating cohesive PDF compilations.","archived":false,"fork":false,"pushed_at":"2025-04-02T13:51:36.000Z","size":3,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-02T14:39:11.265Z","etag":null,"topics":["aspect-ratio","command-line-tool","content-center","cross-platform","custom-page","directory-recursive","document-management","document-processing","file-conversion","file-organization","image-processing","image-to-pdf","multi-format-support","open-source","pdf-merger","pdf-tools","productivity-tool","python","python-utility","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jromero132.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":".github/funding.yml","license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":"jromero132","thanks_dev":null,"custom":null}},"created_at":"2025-04-01T01:06:28.000Z","updated_at":"2025-04-02T13:51:39.000Z","dependencies_parsed_at":"2025-04-02T14:49:14.565Z","dependency_job_id":null,"html_url":"https://github.com/jromero132/pdf-merger","commit_stats":null,"previous_names":["jromero132/pdf-merger"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jromero132%2Fpdf-merger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jromero132%2Fpdf-merger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jromero132%2Fpdf-merger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jromero132%2Fpdf-merger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jromero132","download_url":"https://codeload.github.com/jromero132/pdf-merger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247086023,"owners_count":20881160,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aspect-ratio","command-line-tool","content-center","cross-platform","custom-page","directory-recursive","document-management","document-processing","file-conversion","file-organization","image-processing","image-to-pdf","multi-format-support","open-source","pdf-merger","pdf-tools","productivity-tool","python","python-utility","python3"],"created_at":"2025-04-03T22:16:26.783Z","updated_at":"2025-04-03T22:16:27.322Z","avatar_url":"https://github.com/jromero132.png","language":"Python","funding_links":["https://buymeacoffee.com/jromero132"],"categories":[],"sub_categories":[],"readme":"# PDF and Image Merger\n\n[![Buy Me a Coffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-ffdd00?logo=buy-me-a-coffee\u0026logoColor=black)](\u003chttps://buymeacoffee.com/jromero132\u003e \"Buy Me a Coffee - jromero132\")\n[![Made with Python](https://img.shields.io/badge/Python-\u003e=3.6-blue?logo=python\u0026logoColor=white)](\u003chttps://python.org\u003e \"Go to Python homepage\")\n![Last commit](https://img.shields.io/github/last-commit/jromero132/pdf-merger \"Last commit\")\n---\n\nThis project provides a `Python` script to **merge all PDF files and images in a directory into a single PDF file**.\nPDFs and images are centered on custom-page-sized pages (defaults to `A4`) while maintaining their aspect ratio.\n\n## Features\n\n- Merge multiple `PDF` files into a single `PDF`\n- Convert and add images (`BMP`, `GIF`, `JPEG`, `JPG`, `PNG`, `TIF`, `TIFF`, `WEBP`) to the merged `PDF`\n- Center images on custom-page-sized pages (defaults to `A4`) while maintaining aspect ratio\n- Recursively process files in directories\n\n## Requirements\n\n- Python 3.6+\n- Dependencies listed in `requirements.txt`\n\n## Installation\n\n1. Clone this repository:\n\n   ```bash\n   git clone https://github.com/jromero132/pdf-merger.git\n   cd pdf-merger\n   pip install -r requirements.txt```\n\n## Usage\n\nRun the script from the command line, providing the paths to the files or directories you want to merge:  \n`python main.py /path/to/file1.pdf /path/to/image_directory /path/to/file2.jpg`\n\nThe script will create a merged `PDF` file named output.pdf in the current directory.\n\n## Supported File Types\n\n- PDF files (`*.pdf`)\n- Images: `BMP`, `GIF`, `JPEG`, `JPG`, `PNG`, `TIF`, `TIFF`, `WEBP`\n\n## How It Works\n\n1. The script iterates through all provided paths.\n2. For each path:\n   - If it's a file, it processes the file.\n   - If it's a directory, it recursively processes all files in the directory.\n3. `PDF` files are directly inserted into the output `PDF`.\n4. Images are converted to `PDF` pages:\n   - Each image is centered on an custom-page-sized page (defaults to `A4`).\n   - The aspect ratio of the image is maintained.\n5. All processed pages are combined into a single output `PDF` file.\n\n## Support\n\nIf you encounter any problems or have any questions, please open an issue in the GitHub repository.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a pull request.\n\n## License\n\nThis project is licensed under the terms of the license file included in this repository.\n\n### Happy Coding! 🚀\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjromero132%2Fpdf-merger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjromero132%2Fpdf-merger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjromero132%2Fpdf-merger/lists"}