Scan your whole stack
From OX Research Newsroom
Are you using doppio-nodejs?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.10.0
doppio-nodejs was last scanned on 27 Nov 2026 at version 0.10.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.10.0 LATEST | 27 Nov 2026 | No rules fired |
Findings for v0.10.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.10.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
The official TypeScript SDK for Doppio. Render PDFs and screenshots from HTML or URLs, and render your stored templates.
fetch, so it runs on Node.js, Bun, Deno and edge runtimes.npm install doppio-nodejs
Requires Node.js 18 or later. Node.js 22 or later is recommended, because older versions no longer get security updates.
import { writeFile } from 'node:fs/promises';
import { Doppio } from 'doppio-nodejs';
const doppio = new Doppio(process.env.DOPPIO_API_KEY);
const pdf = await doppio.renderPdfDirect({
goto: {
url: 'https://example.com',
options: { waitUntil: ['networkidle0'] },
},
pdf: { format: 'A4', printBackground: true },
});
await writeFile('example.pdf', new Uint8Array(pdf));
const { Doppio } = require('doppio-nodejs') works too.
| Method | Resolves with |
|---|---|
renderPdfDirect(page, options?) |
the PDF, as an ArrayBuffer |
renderScreenshotDirect(page, options?) |
the image, as an ArrayBuffer |
renderPdfSync(page, options?) |
a DoppioResponse whose documentUrl points to the PDF |
renderScreenshotSync(page, options?) |
a DoppioResponse whose documentUrl points to the image |
renderPdfAsync(page, options?) |
{ requestId, jobId }, then Doppio calls your webhook |
renderScreenshotAsync(page, options?) |
{ requestId, jobId }, then Doppio calls your webhook |
renderTemplateDirect(template, options?) |
the document, as an ArrayBuffer |
renderTemplateSync(template, options?) |
a DoppioResponse |
renderTemplateAsync(template, options?) |
{ requestId, jobId } |
getStatistics(options?) |
the render counts of your organization for the current month |
A page comes either from a URL (goto) or from HTML (setContent), never both. The API expects the HTML in base64, which encodeBase64() produces for any Unicode text:
import { Doppio, encodeBase64 } from 'doppio-nodejs';
const doppio = new Doppio(process.env.DOPPIO_API_KEY);
const image = await doppio.renderScreenshotDirect({
setContent: { html: encodeBase64('<h1>Hello from Doppio</h1>') },
screenshot: { type: 'png', fullPage: true },
});
The API documentation describes every page, PDF and screenshot option.
A template render takes the templateId of a stored template, and optional templateData:
const invoice = await doppio.renderTemplateSync({
templateId: '80d89528-5d3d-4310-be1a-efc349389841',
templateData: { DOP_name: 'Ada' },
});
console.log(invoice.documentUrl);
Client-wide settings go to the constructor:
import { Doppio } from 'doppio-nodejs';
const doppio = new Doppio({
apiKey: process.env.DOPPIO_API_KEY,
timeout: 60_000, // milliseconds, retries included
maxRetries: 2, // after a 429, 502 or 503 response
doppio: { contentDisposition: 'inline' },
launch: { defaultViewport: { width: 1280, height: 800 } },
});
Each method also accepts these settings for a single call. The doppio and launch configs are merged over the client ones:
const controller = new AbortController();
await doppio.renderPdfSync(page, {
signal: controller.signal,
timeout: 10_000,
doppio: {
presignedUrl:
'https://my-bucket.s3.amazonaws.com/report.pdf?X-Amz-Signature=…',
},
});
Retries only apply to 429, 502 and 503 responses, because the API did not process those requests. The client waits for the Retry-After delay when the API sends one, up to 30 seconds.
Every method rejects with a subclass of DoppioError:
| Error | Thrown when | Useful properties |
|---|---|---|
DoppioAPIError |
the API answers with an error status | status, code, messages, body, headers |
DoppioTimeoutError |
the call takes longer than its timeout | timeout |
DoppioConnectionError |
the API cannot be reached | cause |
DoppioError |
the input is invalid, such as goto and setContent together |
Aborting a call through its signal rejects with the signal's reason instead.
Messages are meant for humans and can change, so branch on code, listed in the API documentation:
import { DoppioAPIError } from 'doppio-nodejs';
try {
await doppio.renderPdfSync(page);
} catch (error) {
if (
error instanceof DoppioAPIError &&
error.code === 'MONTHLY_QUOTA_REACHED'
) {
showUpgradeBanner();
} else {
throw error;
}
}
An async render needs a webhook, which Doppio calls once the document is ready:
const { requestId } = await doppio.renderPdfAsync(page, {
doppio: {
webhook: { url: 'https://example.com/doppio-webhook', method: 'POST' },
},
});
Doppio signs each webhook call. Check the signature against the raw body before trusting the payload. This handler uses the standard Request and Response objects of Next.js, Hono, Bun, Deno and Cloudflare Workers:
import {
type DoppioWebhookPayload,
verifyWebhookSignature,
} from 'doppio-nodejs';
export async function POST(request: Request): Promise<Response> {
const body = await request.text();
const valid = await verifyWebhookSignature({
payload: body,
signature: request.headers.get('x-doppio-payload-signature'),
secret: process.env.DOPPIO_WEBHOOK_SECRET,
});
if (!valid) return new Response('Invalid signature', { status: 401 });
const result: DoppioWebhookPayload = JSON.parse(body);
// result.doppioRequestId is the requestId returned by renderPdfAsync
return new Response(null, { status: 204 });
}
debug: true sends the browser console output back with sync renders:
const { consoleOutput } = await doppio.renderPdfSync(page, { debug: true });
onResponse receives the headers of every response, from which parseUsageHeaders() reads the rate limit and the monthly quota. getStatistics() returns the counts of the current month:
import { parseUsageHeaders } from 'doppio-nodejs';
await doppio.renderPdfSync(page, {
onResponse: ({ headers }) => {
const { monthlyRemaining } = parseUsageHeaders(headers);
console.log(`${monthlyRemaining} renders left this month`);
},
});
const { data } = await doppio.getStatistics();
console.log(
`${data.successCount} successful renders in ${data.month}/${data.year}`
);
Existing calls keep working. Three behaviors changed:
HTTP error! status: N. Use status and code on DoppioAPIError rather than the message. Every error is still an instance of DoppioError.doppio config passed to a template render is merged with the client config instead of replacing it.doppio() and launch() are deprecated. The config they set applies to every later call of the client, which is error-prone when one client serves concurrent requests. Pass these configs to the constructor or to a single call instead.See CONTRIBUTING.md. To report a vulnerability, follow SECURITY.md.
MIT
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.