4.0.1 • Published 6 months ago

@shelf/pspdfkit-ssr v4.0.1

Weekly downloads
42
License
MIT
Repository
github
Last release
6 months ago

pspdfkit-ssr CircleCI npm.io npm (scoped)

Install

$ yarn add @shelf/pspdfkit-ssr

Usage

const {createReadStream} = require('fs');
const {uploadPDF, getJWTForDocumentPreview} = require('@shelf/pspdfkit-ssr');

const documentId = await uploadPDF({
  documentId: 'some-custom-document-id',
  fileStream: createReadStream('./file.pdf'),
  fileSize: 1024,
});

const jwt = getJWTForDocumentPreview(documentId);

Note: this library relies upon following environment variables:

  • PSPDFKIT_SERVER_URL
  • PSPDFKIT_SERVER_AUTH_TOKEN
  • PSPDFKIT_SERVER_JWT_KEY
  • PSPDFKIT_SERVER_JWT_PASSPHRASE

Note: this library tries to be idempotent. Unlike PSPDFKit server, it catches errors when document with provided ID was already uploaded.

See Client Authentication section of PSPDFKit documentation for details.

Publish

  • Run sudo npx np, follow interactive UI. Please select appropriate version bump according to semver.

  • After redirect to the prepared release of the early published package just press button Publish release

License

MIT © Shelf

3.1.3

8 months ago

3.2.0

8 months ago

3.1.4

8 months ago

4.0.1

6 months ago

3.0.0

2 years ago

2.1.4

2 years ago

2.1.5

2 years ago

2.1.2

3 years ago

2.1.1

3 years ago

2.1.3

3 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago