Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/minvws/nl-covid19-coronacheck-web-pdf-tools
https://github.com/minvws/nl-covid19-coronacheck-web-pdf-tools
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/minvws/nl-covid19-coronacheck-web-pdf-tools
- Owner: minvws
- License: eupl-1.2
- Created: 2021-06-28T09:07:47.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-21T12:46:27.000Z (7 months ago)
- Last Synced: 2024-06-22T05:09:12.506Z (7 months ago)
- Language: JavaScript
- Size: 13.1 MB
- Stars: 2
- Watchers: 25
- Forks: 1
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# nl-covid19-coronacheck-web-pdf-tools
This is a JavaScript library for generating PDFs for (static) Dutch `domestic` and `european` signed proofs.
## Usage
Use this repository's `git:` URL to install the package in your project:
```sh
npm install "https://github.com/minvws/nl-covid19-coronacheck-web-pdf-tools.git#VERSION"
```Replace `VERSION` with the tag name of the [latest release](https://github.com/minvws/nl-covid19-coronacheck-web-pdf-tools/releases/latest).
### In Node.js
Usage in Node.js requires polyfills for `atob` and `DOMParser`. Be sure to polyfill these before `require`ing or `import()`ing from `nl-covid19-coronacheck-web-pdf-tools`.
E.g. using `jsdom`:
```js
const JSDOM = require("jsdom").JSDOM;
const jsdomWindow = new JSDOM().window;
global.atob = jsdomWindow.atob;
global.DOMParser = jsdomWindow.DOMParser;const { parseProofData, getDocument } = require("nl-covid19-coronacheck-web-pdf-tools");
```Note: when using ES modules, it's important to use the async `import()`, as static `import`s would cause the code to be evaluated at load time, before the polyfills are installed.
## Upgrade
Please refer to the [upgrade guide](documentation/upgrade_guide.md)
## License
This project is licensed under the `EUPL-1.2`. See [LICENSE](./LICENSE).