Skip to content

About

A Node.js wrapper for the Pdfcrowd API

Resources

Stars

57 stars

Watchers

3 watching

Forks

Latest commit

 

History

157 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDFCrowd Node.js SDK

Convert HTML, PDF, and images in Node.js applications using the PDFCrowd API.

Installation

Requires Node.js 18 or newer. Use a maintained Node.js LTS release for new applications.

npm install pdfcrowd

The SDK has no third-party runtime dependencies. See installation and setup for more information.

TypeScript

TypeScript declarations are included. TypeScript projects must provide @types/node 16 or newer, using a version compatible with their compiler. Add it as a development dependency if it is not already installed; the SDK does not install it automatically.

Error codes

Starting with version 7.0.1, status and reason codes parsed from API errors are numbers. Compare error.getStatusCode() === 400, rather than === "400"; use numeric comparisons for error.getReasonCode() too. An error without a status retains undefined, and an error without a parsed reason retains -1.

The error constructor still accepts an explicit string status for an unformatted message and returns it unchanged, so getStatusCode() retains the type number | string | undefined. getReasonCode() returns number. Wrapping an existing SDK error preserves its codes, message, documentation link, string output, and original error as cause.

Documentation

About

A Node.js wrapper for the Pdfcrowd API

Resources

Stars

57 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages