Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Feb 29, 2024 via pnpm

pdfkit 0.13.0

A PDF generation library for Node.js
Package summary
Share
1
issue
1
critical severity
license
1
3
licenses
65
MIT
1
N/A
1
0BSD
Package created
11 Jul 2011
Version published
24 Oct 2021
Maintainers
4
Total deps
67
Direct deps
4
License
MIT

Issues

1

1 critical severity issue

critical
Recommendation: Check the package code and files for license information
via: png-js@1.0.0
Collapse
Expand

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
65 Packages, Including:
@swc/helpers@0.3.17
array-buffer-byte-length@1.0.1
available-typed-arrays@1.0.7
base64-js@0.0.8
base64-js@1.5.1
brotli@1.3.3
call-bind@1.0.7
clone@2.1.2
crypto-js@4.2.0
deep-equal@2.2.3
define-data-property@1.1.4
define-properties@1.2.1
dfa@1.2.0
es-define-property@1.0.0
es-errors@1.3.0
es-get-iterator@1.1.3
fontkit@1.9.0
for-each@0.3.3
function-bind@1.1.2
functions-have-names@1.2.3
get-intrinsic@1.2.4
gopd@1.0.1
has-bigints@1.0.2
has-property-descriptors@1.0.2
has-proto@1.0.3
has-symbols@1.0.3
has-tostringtag@1.0.2
hasown@2.0.1
internal-slot@1.0.7
is-arguments@1.1.1
is-array-buffer@3.0.4
is-bigint@1.0.4
is-boolean-object@1.1.2
is-callable@1.2.7
is-date-object@1.0.5
is-map@2.0.2
is-number-object@1.0.7
is-regex@1.1.4
is-set@2.0.2
is-shared-array-buffer@1.0.3
is-string@1.0.7
is-symbol@1.0.4
is-weakmap@2.0.1
is-weakset@2.0.2
isarray@2.0.5
linebreak@1.1.0
object-inspect@1.13.1
object-is@1.1.6
object-keys@1.1.1
object.assign@4.1.5

N/A

N/A
1 Packages, Including:
png-js@1.0.0

BSD Zero Clause License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
include-copyright
include-license
include-original
Cannot
hold-liable
Must
1 Packages, Including:
tslib@2.6.2
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

4
All Dependencies CSV
β“˜ This is a list of pdfkit 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
crypto-js4.2.085.24 kBMIT
prod
fontkit1.9.0643.56 kBMIT
prod
linebreak1.1.025.3 kBMIT
prod
png-js1.0.01.96 MBUNKNOWN
prod
1

Visualizations

Frequently Asked Questions

What does pdfkit do?

PDFKit is a JavaScript PDF generation library primarily used with Node.js, but it's also compatible with web browsers. Its aim is to simplify the creation of complex, multi-page, printable documents by offering both low-level functions and abstractions for higher-level functionalities. PDFKit's capabilities include generating vector graphics, embedding fonts and images, creating text with line wrapping and alignment options, incorporating annotations, and offering AcroForms, outlines and PDF security features such as encryption and access privileges.

How do you use pdfkit?

To use PDFKit, you first need to install it using the npm package manager by running the command npm install pdfkit. After the installation, you can require it in your Node.js code and start using its features. Here's an example of how to use it:

const PDFDocument = require('pdfkit');
const fs = require('fs');

const doc = new PDFDocument();
doc.pipe(fs.createWriteStream('output.pdf'));

doc
  .font('fonts/PalatinoBold.ttf')
  .fontSize(25)
  .text('Some text with an embedded font!', 100, 100);

doc.image('path/to/image.png', {
  fit: [250, 300],
  align: 'center',
  valign: 'center'
});

doc
  .addPage()
  .fontSize(25)
  .text('Here is some vector graphics...', 100, 100)
  .save();

doc.end();

This code creates a new PDF document, sets an output file, embeds a font and places text, adds an image, and generates a new page with text. In the end, it finalizes the PDF file.

Where are the pdfkit docs?

The documentation for PDFKit includes a detailed explanation of the API, examples, and more usage guidelines. It can be found on the PDFKit website. The documentation is designed to be straightforward to simplify the process of generating complex documents using just a few function calls. It also includes an interactive in-browser demo to display PDFKit's functionality effectively.