{"id":51675894,"url":"https://github.com/orchetect/swift-pdf-processor","last_synced_at":"2026-07-15T06:00:33.892Z","repository":{"id":153806020,"uuid":"622454611","full_name":"orchetect/swift-pdf-processor","owner":"orchetect","description":"Batch PDF operations for Swift","archived":false,"fork":false,"pushed_at":"2026-06-22T06:08:35.000Z","size":361,"stargazers_count":14,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-24T10:52:16.458Z","etag":null,"topics":["pdf","pdf-document-processor","pdf-files","pdf-merger","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/orchetect.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"orchetect"}},"created_at":"2023-04-02T06:45:34.000Z","updated_at":"2026-06-22T06:08:40.000Z","dependencies_parsed_at":"2024-02-17T06:30:18.489Z","dependency_job_id":"15a10573-8261-4527-a1bd-20ebbda5e3c1","html_url":"https://github.com/orchetect/swift-pdf-processor","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/orchetect/swift-pdf-processor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orchetect%2Fswift-pdf-processor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orchetect%2Fswift-pdf-processor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orchetect%2Fswift-pdf-processor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orchetect%2Fswift-pdf-processor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orchetect","download_url":"https://codeload.github.com/orchetect/swift-pdf-processor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orchetect%2Fswift-pdf-processor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35493172,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-15T02:00:06.706Z","response_time":131,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["pdf","pdf-document-processor","pdf-files","pdf-merger","swift"],"created_at":"2026-07-15T06:00:15.958Z","updated_at":"2026-07-15T06:00:33.877Z","avatar_url":"https://github.com/orchetect.png","language":"Swift","funding_links":["https://github.com/sponsors/orchetect"],"categories":[],"sub_categories":[],"readme":"# SwiftPDFProcessor\n\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Forchetect%2Fswift-pdf-processor%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/orchetect/swift-pdf-processor) [![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Forchetect%2Fswift-pdf-processor%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/orchetect/swift-pdf-processor) [![License: MIT](http://img.shields.io/badge/license-MIT-lightgrey.svg?style=flat)](https://github.com/orchetect/swift-pdf-processor/blob/main/LICENSE)\n\nBatch PDF utilities with simple API for Swift. Declarative API for:\n\n- assigning or removing file attributes (metadata)\n- file filtering, ordering, and merging\n- page management: reordering, collation, copying, moving, and replacement\n- page presentation: rotation, cropping, etc.\n- page content: filtering, removal or burn-in of annotations, removal of file protections\n\n## Installation\n\n### Swift Package Manager (SPM)\n\nTo add this package to an Xcode app project, use:\n\n `https://github.com/orchetect/swift-pdf-processor` as the URL.\n\nTo add this package to a Swift package, add the dependency to your package and target in Package.swift:\n\n```swift\nlet package = Package(\n    dependencies: [\n        .package(url: \"https://github.com/orchetect/swift-pdf-processor\", from: \"0.3.0\")\n    ],\n    targets: [\n        .target(\n            dependencies: [\n                .product(name: \"PDFProcessor\", package: \"swift-pdf-processor\")\n            ]\n        )\n    ]\n)\n```\n\n## Basic Usage\n\n```swift\nimport PDFProcessor\n\nlet sources = [URL, URL, URL, ...] // URLs to one or more PDF files\nlet outputDir = URL.desktopDirectory\n```\n\nThe steps of loading source PDFs, performing operations, and saving the resulting PDFs can be performed individually:\n\n```swift\nlet processor = PDFProcessor()\n\ntry processor.load(pdfs: sources)\ntry processor.perform(operations: [\n    // one or more operations\n])\n\n// access the resulting PDF documents in memory\nprocessor.pdfDocuments // [PDFDocument]\n\n// or save them as PDF files to disk\ntry processor.savePDFs(outputDir: outputDir)\n```\n\nOr a fully automated batch operation can be run with a single call to `run()` by passing in a populated instance of `PDFProcessor.Settings`.\n\n```swift\nlet settings = try PDFProcessor.Settings(\n    sourcePDFs: sources,\n    outputDir: outputDir,\n    operations: [\n        // one or more operations\n    ],\n    savePDFs: true\n)\n\ntry PDFProcessor().run(using: settings)\n```\n\n## Batch Operations\n\nThe following are single operations that may be used in a batch sequence of operations.\n\n\u003e [!NOTE]\n\u003e More operations may be added in future on an as-needed basis.\n\n### File Operations\n\n- New empty file\n- Clone file\n- Filter files\n- Merge files\n- Set file filename(s)\n- Set or remove file attributes (metadata such as title, author, etc.)\n- Remove file protections (encryption and permissions)\n\n### Page Operations\n\n- Filter pages\n- Copy pages\n- Move pages\n- Replace pages by copying or moving them\n- Reverse page order (all or subset of pages)\n- Rotate pages\n- Crop pages\n- Split file into multiple files\n\n### Page Content Operations\n\n- Filter annotations (by types, or remove all)\n- Burn in annotations\n- Extract plain text (to system pasteboard, to file on disk, or to variable in memory)\n\n## Author\n\nCoded by a bunch of 🐹 hamsters in a trenchcoat that calls itself [@orchetect](https://github.com/orchetect).\n\n## License\n\nLicensed under the MIT license. See [LICENSE](LICENSE) for details.\n\n## Sponsoring\n\nIf you enjoy using this library and want to contribute to open-source financially, GitHub sponsorship is much appreciated. Feedback and code contributions are also welcome.\n\n## Community \u0026 Support\n\nPlease do not email maintainers for technical support. Several options are available for issues and questions:\n\n- Questions and feature ideas can be posted to [Discussions](https://github.com/orchetect/swift-pdf-processor/discussions).\n- If an issue is a verifiable bug with reproducible steps it may be posted in [Issues](https://github.com/orchetect/swift-pdf-processor/issues).\n\n## Contributions\n\nContributions are welcome. Posting in [Discussions](https://github.com/orchetect/swift-pdf-processor/discussions) first prior to new submitting PRs for features or modifications is encouraged.\n\n## Code Quality \u0026 AI Contribution Policy\n\nIn an effort to maintain a consistent level of code quality and safety, this repository was built by hand and is maintained without the use of AI code generation.\n\nAI-assisted contributions are welcome, but must remain modest in scope, maintain the same degree of quality and care, and be thoroughly vetted before acceptance.\n\n## Legacy\n\nThis repository was formerly known as PDFGadget.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forchetect%2Fswift-pdf-processor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forchetect%2Fswift-pdf-processor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forchetect%2Fswift-pdf-processor/lists"}