Code Monkey home page Code Monkey logo

pspdfkit-ssr's Introduction

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

pspdfkit-ssr's People

Contributors

dependabot[bot] avatar dianakryskuw avatar hmelenok avatar randomhash avatar renovate-bot avatar renovate[bot] avatar siloss avatar terret avatar vladgolubev avatar vladholubiev avatar whodeen avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pspdfkit-ssr's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

circleci
.circleci/config.yml
  • circleci/node 16
npm
package.json
  • form-data 4.0.0
  • jsonwebtoken 8.5.1
  • ms 3.0.0-canary.1
  • node-fetch 2.6.8
  • @babel/cli 7.20.7
  • @babel/core 7.20.12
  • @shelf/babel-config 1.2.0
  • @shelf/eslint-config 2.27.1
  • @shelf/prettier-config 1.0.0
  • @shelf/tsconfig 0.0.9
  • @types/jest 29.4.0
  • @types/jsonwebtoken 9.0.1
  • @types/node-fetch 2.6.2
  • eslint 8.33.0
  • husky 8.0.3
  • jest 29.4.1
  • lint-staged 13.1.0
  • prettier 2.8.3
  • typescript 4.9.4
  • node >=16

  • Check this box to trigger a request for Renovate to run again on this repository

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: Cannot find preset's package (github>shelfio/renovate-config)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.