
Security News
Ruby's Bundler 4.0.18 Extends Cooldown to bundle lock and bundle cache
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.
@intenttext/pdf
Advanced tools
Server-side PDF generation for IntentText (.it) documents — merge, seal, and render real PDF bytes for emailing and archiving. Opt-in companion to @intenttext/core.
Server-side PDF generation for IntentText
(.it) documents — for the moments no human is at a browser: emailing an invoice,
archiving for compliance, month-end batch statements.
@intenttext/core stays zero-dependency; this is the opt-in enterprise companion.
npm i @intenttext/pdf
# plus ONE of:
npm i puppeteer # bundles Chromium — zero config
npm i puppeteer-core # uses your existing Chrome (set CHROME_PATH if not auto-found)
Merge data into the template → seal the merged document (tamper-evident SHA-256) → real PDF bytes:
import { issuePDF } from "@intenttext/pdf";
const { source, hash, at, pdf } = await issuePDF(template.source, invoiceData, {
signer: "Jadwal Billing",
role: "Finance",
theme: "corporate",
});
await db.invoices.updateOne({ _id }, { $set: { itSource: source, itHash: hash, issuedAt: at } });
await s3.putObject({ Key: `invoices/${number}.pdf`, Body: pdf }); // archive what was sent
await mailer.send({ attachments: [{ filename: `${number}.pdf`, content: pdf }] });
source — the sealed .it text. Store it on the record: it's the queryable,
hash-verifiable legal artifact (a few KB of text). Years later,
verifyDocument(source) from @intenttext/core proves it unaltered.pdf — the bytes you email/archive.{{fields}} render blank (it's a finished document), pass
missing: "keep" to override.issueDocument() is the same flow minus the PDF — pure, synchronous, no Chrome:
import { issueDocument } from "@intenttext/pdf";
const { source, hash, html } = issueDocument(template.source, data, { signer: "Jadwal Billing" });
// POST `html` to your HTML→PDF sidecar (e.g. Gotenberg), store `source` yourself.
import { renderPDF, htmlToPDF, createPdfRenderer } from "@intenttext/pdf";
await renderPDF(itSource, { theme: "corporate" }); // finished .it → PDF bytes
await htmlToPDF(printHtml); // bring-your-own HTML → PDF bytes
// Batch (reuses one Chrome — launching costs ~1s):
const r = await createPdfRenderer({ theme: "corporate" });
for (const s of statements) {
const { pdf } = await r.issuePDF(tmpl, s, { signer: "Jadwal Billing" });
await s3.putObject({ Key: `statements/${s.id}.pdf`, Body: pdf });
}
await r.close();
puppeteer if installed (its bundled Chromium).puppeteer-core + a binary from: executablePath option →
$PUPPETEER_EXECUTABLE_PATH → $CHROME_PATH → common install paths
(macOS/Linux/Windows).In containers, pass launchArgs: ["--no-sandbox"] if your image requires it.
Full integration guide (storage model, Mongo shapes, receipts, Arabic/RTL): ecosystem → ERP / App Integration in the IntentText docs.
FAQs
Server-side PDF generation for IntentText (.it) documents — merge, seal, and render real PDF bytes for emailing and archiving. Opt-in companion to @intenttext/core.
The npm package @intenttext/pdf receives a total of 0 weekly downloads. As such, @intenttext/pdf popularity was classified as not popular.
We found that @intenttext/pdf 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
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.

Company News
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.