{"id":15029046,"url":"https://github.com/gmitirol/toolkit-pdftk","last_synced_at":"2025-04-09T20:32:16.556Z","repository":{"id":62511405,"uuid":"160485218","full_name":"gmitirol/toolkit-pdftk","owner":"gmitirol","description":"Object-oriented PDFtk wrapper","archived":false,"fork":false,"pushed_at":"2024-09-17T07:43:33.000Z","size":410,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-23T22:25:09.267Z","etag":null,"topics":["pdf","pdf-manipulation","pdftk","php","php7"],"latest_commit_sha":null,"homepage":null,"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/gmitirol.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-05T08:26:46.000Z","updated_at":"2024-11-11T12:45:58.000Z","dependencies_parsed_at":"2024-06-03T16:12:37.198Z","dependency_job_id":"74f86efe-717c-4f17-b1d6-788daf6754b2","html_url":"https://github.com/gmitirol/toolkit-pdftk","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmitirol%2Ftoolkit-pdftk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmitirol%2Ftoolkit-pdftk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmitirol%2Ftoolkit-pdftk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmitirol%2Ftoolkit-pdftk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gmitirol","download_url":"https://codeload.github.com/gmitirol/toolkit-pdftk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248107281,"owners_count":21048891,"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":["pdf","pdf-manipulation","pdftk","php","php7"],"created_at":"2024-09-24T20:09:37.890Z","updated_at":"2025-04-09T20:32:16.524Z","avatar_url":"https://github.com/gmitirol.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"PHP Toolkit - PDFtk\n===================\n\nThis library provides an object-oriented, simple interface for the most important PDFtk features.\n\nThe current build status and code analysis can be found here:\n  * [Scrutinizer CI](https://scrutinizer-ci.com/g/gmitirol/toolkit-pdftk/)\n\nRequirements\n------------\n* PHP 7.1.0 or higher\n* mbstring extension\n* pdftk\n\nInstallation\n------------\nThe recommended way to install toolkit-pdftk is via composer.\n```json\n\"require\": {\n    \"gmi/toolkit-pdftk\": \"3.0.*\"\n}\n```\n\nUsage examples\n--------------\n```php\nuse Gmi\\Toolkit\\Pdftk\\Bookmark;\nuse Gmi\\Toolkit\\Pdftk\\Pdftk;\n\n$source = '/path/to/source.pdf';\n$target = '/path/to/target.pdf';\n\n$pdftk = new Pdftk();\n// import a source PDF (metadata, page information, bookmarks)\n$pdftk-\u003eimport($source);\n\n// create an additional bookmark\n$exampleBookmark = new Bookmark();\n$exampleBookmark\n    -\u003esetPageNumber(1)\n    -\u003esetLevel(2)\n    -\u003esetTitle('Section 3')\n;\n\n// add the bookmark to the PDF\n$pdftk-\u003ebookmarks()-\u003eadd($exampleBookmark);\n// set metadata entry for the PDF\n$pdftk-\u003emetadata()-\u003eset('Author', 'Jane Doe');\n\n// apply bookmarks and metadata to the source PDF using a specified target PDF\n$pdftk-\u003eapply($source, $target);\n```\n\nTests\n-----\nThe test suite can be run with `vendor/bin/phpunit tests`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmitirol%2Ftoolkit-pdftk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgmitirol%2Ftoolkit-pdftk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmitirol%2Ftoolkit-pdftk/lists"}