@shelf/pspdfkit-ssr
TypeScript icon, indicating that this package has built-in type declarations

4.0.1 • Public • Published

pspdfkit-ssr CircleCI 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

Readme

Keywords

Package Sidebar

Install

npm i @shelf/pspdfkit-ssr

Weekly Downloads

151

Version

4.0.1

License

MIT

Unpacked Size

10.1 kB

Total Files

18

Last publish

Collaborators

  • ksenia_holovko
  • petro.bodnarchuk
  • kateryna-kochina
  • maksym.tarnavskyi
  • andrii-nastenko
  • mykhailo.yatsko
  • ahavrysh
  • nikita_shelf
  • maciej.orlowski
  • monopotan
  • andrew214
  • bogdan.kolesnyk
  • andrii.batutin
  • kristina.zhak
  • anton-russo
  • mmazurowski
  • toms-shelf
  • mateuszgajdashelf
  • kchlon
  • dmytro.harazdovskiy
  • duch0416
  • i5adovyi
  • olesiamuller
  • mykola.khytra
  • yuliiakovalchuk
  • el_scrambone
  • bodyaflesh
  • slavammellnikov
  • andriisermiahin
  • mpushkin
  • batovpavlo
  • domovoj
  • vozemer
  • oleksii.dymnich
  • dima-bond
  • maksym.hayovets
  • oles.zadorozhnyy
  • ss1l
  • gemshelf
  • hartzler
  • vladgolubev
  • hmelenok
  • knupman
  • maaraanas
  • terret
  • chapelskyi.slavik
  • pihorb
  • irynah
  • diana.kryskuv
  • andy.raven
  • rafler
  • sskalp88
  • demiansua
  • yuriil
  • ktv18
  • drews_abuse
  • rostyslav-horytskyi
  • whodeen