{"id":18765322,"url":"https://github.com/setasign/fpdi-protection","last_synced_at":"2025-07-01T05:33:10.331Z","repository":{"id":47477633,"uuid":"102625479","full_name":"Setasign/fpdi-protection","owner":"Setasign","description":"A FPDI compatible and enhanced version of the FPDF_Protection script.","archived":false,"fork":false,"pushed_at":"2024-07-08T14:23:52.000Z","size":711,"stargazers_count":31,"open_issues_count":4,"forks_count":13,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-03T00:39:03.729Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","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/Setasign.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":"2017-09-06T15:26:20.000Z","updated_at":"2024-09-16T21:41:02.000Z","dependencies_parsed_at":"2024-12-16T17:23:34.293Z","dependency_job_id":"309c84e6-2978-4c46-a3da-3cbdd4d91ec3","html_url":"https://github.com/Setasign/fpdi-protection","commit_stats":{"total_commits":19,"total_committers":4,"mean_commits":4.75,"dds":"0.21052631578947367","last_synced_commit":"2ce6a33287bfa1fb2c9e9adc7009f44901d1b883"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Setasign%2Ffpdi-protection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Setasign%2Ffpdi-protection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Setasign%2Ffpdi-protection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Setasign%2Ffpdi-protection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Setasign","download_url":"https://codeload.github.com/Setasign/fpdi-protection/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248131413,"owners_count":21052837,"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":[],"created_at":"2024-11-07T18:33:34.105Z","updated_at":"2025-04-10T00:19:02.492Z","avatar_url":"https://github.com/Setasign.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"FpdiProtection\n=================================\n\n[![Latest Stable Version](https://poser.pugx.org/setasign/fpdi-protection/v/stable.svg)](https://packagist.org/packages/setasign/fpdi-protection) [![Total Downloads](https://poser.pugx.org/setasign/fpdi-protection/downloads.svg)](https://packagist.org/packages/setasign/fpdi-protection) [![Latest Unstable Version](https://poser.pugx.org/setasign/fpdi-protection/v/unstable.svg)](https://packagist.org/packages/setasign/fpdi-protection) [![License](https://poser.pugx.org/setasign/fpdi-protection/license.svg)](https://packagist.org/packages/setasign/fpdi-protection)\n\nA [FPDI](https://www.setasign.com/fpdi) 2 compatible and enhanced version of the [FPDF_Protection](http://www.fpdf.org/en/script/script37.php) script.\n\nThis version requires and uses OpenSSL functions instead of Mcrypt or a user land implementation of RC4.\n\nRC4-40bits and RC4-128bits encryption are supported.\n\n## Installation with [Composer](https://packagist.org/packages/setasign/fpdi-protection)\n\n```json\n{\n    \"require\": {\n        \"setasign/fpdi-protection\": \"^2.0\"\n    }\n}\n```\n\n## Manual Installation\n\nIf you do not use composer, just require the autoload.php in the /src folder:\n\n```php\nrequire_once('src/autoload.php');\n```\n\nIf you have a PSR-4 autoloader implemented, just register the src path as follows:\n```php\n$loader = new \\Example\\Psr4AutoloaderClass;\n$loader-\u003eregister();\n$loader-\u003eaddNamespace('setasign\\FpdiProtection', 'path/to/src/');\n```\n\nDon't forget to install [FPDI](https://www.setasign.com/fpdi) and [FPDF](http://www.fpdf.org/), too!\n\n## Example\n\nThis class offers one public method, which allows you to set the protection of the resulting PDF document.\nAll other code is identically to [FPDI](https://www.setasign.com/fpdi) or [FPDF](http://www.fpdf.org/).\n\nIf you pass null or an empty string as the owner password the method will create a random owner password.\nThe return value of this method is the owner password.\n\n```php\n\u003c?php\nuse setasign\\FpdiProtection\\FpdiProtection;\n\n// setup the autoload function\nrequire_once('vendor/autoload.php');\n\n$pdf = new FpdiProtection();\n$ownerPassword = $pdf-\u003esetProtection(\n    FpdiProtection::PERM_PRINT | FpdiProtection::PERM_COPY,\n    'the user password',\n    'the owner password'\n);\n\n// ...\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsetasign%2Ffpdi-protection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsetasign%2Ffpdi-protection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsetasign%2Ffpdi-protection/lists"}