{"id":43886168,"url":"https://github.com/langleyfoxall/pdf-stitcher","last_synced_at":"2026-02-06T16:11:41.778Z","repository":{"id":57011173,"uuid":"202530076","full_name":"langleyfoxall/pdf-stitcher","owner":"langleyfoxall","description":"Allows you to easily stitch together multiple PDFs into a single file","archived":false,"fork":false,"pushed_at":"2023-05-15T13:09:09.000Z","size":20,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-06T09:59:46.653Z","etag":null,"topics":["ghostscript","pdf","pdf-generation","php-library"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/langleyfoxall.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-15T11:35:05.000Z","updated_at":"2022-04-09T09:47:39.000Z","dependencies_parsed_at":"2022-08-21T13:40:45.517Z","dependency_job_id":null,"html_url":"https://github.com/langleyfoxall/pdf-stitcher","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/langleyfoxall/pdf-stitcher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/langleyfoxall%2Fpdf-stitcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/langleyfoxall%2Fpdf-stitcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/langleyfoxall%2Fpdf-stitcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/langleyfoxall%2Fpdf-stitcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/langleyfoxall","download_url":"https://codeload.github.com/langleyfoxall/pdf-stitcher/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/langleyfoxall%2Fpdf-stitcher/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29167876,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T15:38:29.831Z","status":"ssl_error","status_checked_at":"2026-02-06T15:37:48.592Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["ghostscript","pdf","pdf-generation","php-library"],"created_at":"2026-02-06T16:11:40.912Z","updated_at":"2026-02-06T16:11:41.761Z","avatar_url":"https://github.com/langleyfoxall.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PDF Stitcher\n\nThe PDF Stitcher library allows you to easily stitch together multiple PDFs into a single file.\n\n## Installation\n\nTo install the PDF Stitcher package, run the following Composer command.\n\n```bash\ncomposer require langleyfoxall/pdf-stitcher\n```\n\nPlease note that this package requires Ghostscript (`gs`) to be installed\non your server. If you are running Ubuntu, this can be installed with the\nfollowing command.\n\n```bash\nsudo apt install ghostscript\n```\n\n## Usage\n\nSee the following basic usage example.\n\n```php\n(new PdfStitcher)\n    -\u003eaddPdf('firstDocument.pdf')\n    -\u003eaddPdfs(['secondDocument.pdf', 'yetAnotherDocument.pdf'])\n    -\u003esave('destinationDocument.pdf');\n```\n\nThis will take in three input PDFs, stitch them together, and save out\nthe result to `destinationDocument.pdf`. The documents will be stitched\ntogether in the order they are added.\n\n### Where Ghostscript is in an unusual location\n\nA path to a Ghostscript executable can be passed into the `PdfStitcher` constructor:\n\n```php\nnew PdfStitcher('a/path/to/a/gs/executable')\n```\n\n### Additional Ghostscript arguments\n\nAdditional Ghostscript arguments can be passed into the `PdfStitcher` constructor:\n\n```php\nnew PdfStitcher(null, '-dNEWPDF=false')\n```\n\nThese will NOT be escaped in any way.\n\n### Including only specific pages from a PDF\n\nYou may optionally give an array of page indices when adding a PDF:\n\n```php\n(new PdfStitcher)\n    -\u003eaddPdf('firstDocument.pdf', [0, 2, 3, 5])\n    -\u003esave('destinationDocument.pdf');\n```\n\nOnly the page numbers you list will be included.\n\nThe following will be rejected:\n\n- Non-integer page numbers.\n- Page numbers less than zero.\n- Duplicate page numbers (e.g. 1, 3, 3, 5, 7).\n- Misordered page numbers (e.g. 1, 5, 3, 7).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flangleyfoxall%2Fpdf-stitcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flangleyfoxall%2Fpdf-stitcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flangleyfoxall%2Fpdf-stitcher/lists"}