
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
node-pdfsigner
Advanced tools
Node module for electronically signing a PDF, makes use of PDFkit and pdftk CLI tool
A Javascript library that electronically signs and dates a PDF document for Node.
Node-pdfsigner relies on devongovett's npm package pdfkit and PDF Labs' PDFtk Server CLI tool PDFtk Server.
Installation uses the npm package manager. Just type the following command after installing npm.
npm install pdfkit
You'll need to follow the instructions from PDF labs here to install pdftk.
To install on Ubuntu Linux:
sudo apt-get install pdftk
The original PDF is signed in a two-step process. A temporary pdf is created using pdfkit that contains the signature, then the signature PDF is overlayed and combined with the input file. The current version will apply the signature to each page of the PDF.
Default options:
let defaults = {
name: "Unknown",
ip: 'Unknown',
date: true,
resultFilename: 'output.pdf',
fontSize: 8,
color: "black",
removeSignaturePdf: true
};
Example:
const pdfSigner = require('pdfSigner')
const options = {
name: 'John Doe',
ip: '59.164.59.14',
date: true,
resultFilename: 'example_output.pdf',
color: "red"
}
pdfSigner('sample.pdf', options, function(err, output){
if (err) console.log('callback: ', err)
console.log(`Created signed PDF file: ${output}`)
});
Original input file:

Generated PDF signature:

Result:

Tested on Ubuntu 16.04
PDFKit is available under the MIT license.
FAQs
Node module for electronically signing a PDF, makes use of PDFkit and pdftk CLI tool
We found that node-pdfsigner demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.