{"id":18812569,"url":"https://github.com/jsreport/jsreport-pdf-password","last_synced_at":"2025-04-13T21:24:05.548Z","repository":{"id":57286305,"uuid":"80312394","full_name":"jsreport/jsreport-pdf-password","owner":"jsreport","description":"jsreport extension adding password protection to PDF reports","archived":false,"fork":false,"pushed_at":"2020-05-21T12:05:02.000Z","size":15273,"stargazers_count":7,"open_issues_count":8,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-27T11:43:34.482Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://jsreport.net","language":"JavaScript","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/jsreport.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":"2017-01-28T21:36:10.000Z","updated_at":"2023-09-08T06:25:24.000Z","dependencies_parsed_at":"2022-09-09T23:11:36.731Z","dependency_job_id":null,"html_url":"https://github.com/jsreport/jsreport-pdf-password","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsreport%2Fjsreport-pdf-password","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsreport%2Fjsreport-pdf-password/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsreport%2Fjsreport-pdf-password/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsreport%2Fjsreport-pdf-password/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsreport","download_url":"https://codeload.github.com/jsreport/jsreport-pdf-password/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248783663,"owners_count":21160964,"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-07T23:34:09.760Z","updated_at":"2025-04-13T21:24:05.525Z","avatar_url":"https://github.com/jsreport.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003e ⚠️ This extension is deprecated because it is part of the [jsreport-pdf-utils](https://jsreport.net/learn/pdf-utils) now.\n\n# jsreport-pdf-password\n\n[![NPM Version](http://img.shields.io/npm/v/jsreport-pdf-password.svg?style=flat-square)](https://npmjs.com/package/jsreport-pdf-password)[![Build Status](https://travis-ci.org/jsreport/jsreport-pdf-password.png?branch=master)](https://travis-ci.org/jsreport/jsreport-pdf-password)\n\n\u003e jsreport extension adding password protection to PDF reports\n\n![demo](demo.gif)\n\nAdding `pdf-password` extension will let you add password protection to PDF rendered by any PDF recipe extension (such as [jsreport-phantom-pdf](https://github.com/jsreport/jsreport-phantom-pdf/), [jsreport-electron-pdf](https://github.com/bjrmatos/jsreport-electron-pdf), etc)\n\n## Installation\n\n\u003e **npm install jsreport-pdf-password**\n\n## Usage\n\nTo use `pdf-password` in template rendering set the available [options](#options) for password protection in the request.\n\n```js\n{\n  template: {\n    content: '...',\n    recipe: '...',\n    engine: '...',\n    pdfPassword: {\n      active: true,\n      password: '1234'\n      /* ...other options... */\n    }\n  }\n}\n```\n\n## Options\n\n- `active` `(Boolean)` -\u003e tells if password protection should be active in this request, defaults to `false`.\n- `password` `(String)` -\u003e The password to be used when protecting the pdf, this option is `required` when the `active` option is `true`.\n- `ownerPassword` `(String)` -\u003e The owner password is used to protect the pdf file from modifications\n- `protectionLevel` `(Number)` -\u003e Specifies the level of protection for the pdf, posibles values are:\n\n  - `-1` -\u003e none, the `default` level will be used\n  - `3` -\u003e allow the user to print the document\n  - `4` -\u003e allow modification of the document\n  - `5` -\u003e allow copying or extracting text and graphics from the document, this is the `default` used if none is set\n  - `6` -\u003e allow adding text annotations, fill form field\n  - `9` -\u003e allow filling forms\n  - `10` -\u003e allow extracting text and graphics in support of accessibility only\n  - `11` -\u003e allow assembling the document. rotate, insert, delete pages, bookmarks and thumbnails\n  - `12` -\u003e allow printing the document in a good res. Setting just 3 will normally print a low res form\n\n  this option requires `ownerPassword` option to be set\n\n## jsreport-core\nYou can apply this extension also manually to [jsreport-core](https://github.com/jsreport/jsreport-core)\n\n```js\nvar jsreport = require('jsreport-core')()\njsreport.use(require('jsreport-pdf-password')())\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsreport%2Fjsreport-pdf-password","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsreport%2Fjsreport-pdf-password","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsreport%2Fjsreport-pdf-password/lists"}