Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
@signpdf/placeholder-pdf-lib
Advanced tools
Works with PDF-LIB
and given a PDFDocument that is in the works, adds an e-signature placeholder. When the PDF is ready you can convert it to Buffer and pass it to @signpdf/signpdf
to complete the process.
You will need $ npm i -S @signpdf/placeholder-pdf-lib pdf-lib @signpdf/signpdf node-forge
and a look at the pdf-lib.js example.
Signing in detached mode makes the signature length independent of the PDF's content length, but it may still vary between different signing certificates. So every time you sign using the same P12 you will get the same length of the output signature, no matter the length of the signed content. It is safe to find out the actual signature length your certificate produces and use it to properly configure the placeholder length.
To produce PAdES compliant signatures, the ETSI Signature Dictionary SubFilter value must be ETSI.CAdES.detached
instead of the standard Adobe value.
This can be declared using the subFilter option argument.
import { pdflibAddPlaceholder } from '@signpdf/placeholder-pdf-lib';
import { SUBFILTER_ETSI_CADES_DETACHED } from '@signpdf/utils';
pdflibAddPlaceholder({
pdfDoc: pdfToSign,
...,
subFilter: SUBFILTER_ETSI_CADES_DETACHED,
});
[3.2.4]
pdf-lib
's PDFPage
.pdfDoc
or pdfPage
is required, not both.tsd
to verify the types that we generate.FAQs
Use PDF-LIB to insert a signature placeholder.
The npm package @signpdf/placeholder-pdf-lib receives a total of 3,998 weekly downloads. As such, @signpdf/placeholder-pdf-lib popularity was classified as popular.
We found that @signpdf/placeholder-pdf-lib demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.