diff --git a/packages/utils/README.md b/packages/utils/README.md new file mode 100644 index 00000000..5db93909 --- /dev/null +++ b/packages/utils/README.md @@ -0,0 +1,24 @@ +# ![@signpdf](https://raw.githubusercontent.com/vbuch/node-signpdf/master/resources/logo-horizontal.svg?sanitize=true) + +[![npm version](https://badge.fury.io/js/@signpdf%2Futils.svg)](https://badge.fury.io/js/@signpdf%2Futils) +[![Donate to this project using Buy Me A Coffee](https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg)](https://buymeacoffee.com/vbuch) + +Utilities from and for the [@signpdf family of packages](https://github.com/vbuch/node-signpdf/) that tries to make signing of PDFs simple in Node.js. + +## Usage + +Used by the other `@signpdf` packages internally. Additionally, needed for **PAdES compliant signatures**" + +```js +import { plainAddPlaceholder } from '@signpdf/placeholder-plain'; +import { SUBFILTER_ETSI_CADES_DETACHED } from '@signpdf/utils'; + +const pdfToSign = plainAddPlaceholder({ + ..., + subFilter: SUBFILTER_ETSI_CADES_DETACHED, +}); +``` + +## Notes + +* Feel free to copy and paste any part of this code. See its defined [Purpose](#purpose).