Convert, generate, merge, split, and extract data from PDF and other documents via the PDF.co API.
PDF.co ships in the w6w first-party pack. It declares 24 actions, 2 health checks, and the host runs its code in a sandbox that never sees the credential.
io.w6w.pdfcoPDF.co puts a full document-processing toolkit into a workflow — convert a PDF to text, structured JSON, CSV table data, HTML or per-page JPEGs; render HTML, a live web page, or an image into a PDF; merge, split, rotate, search and inspect PDFs; overlay text, images and form fields onto an existing page; add or remove password protection; and generate or read barcodes across multiple formats in one call. A background job can be polled to completion, and a remote file can be rehosted into PDF.co’s own temporary storage before further processing.
Every action is built against the vendor’s own per-endpoint documentation rather than its generated OpenAPI file, which lower-cases nearly every field name in a case-sensitive API — sending that casing does not error, it silently falls back to a default and returns a normal-looking success. The same care applies to page numbering: nearly every action counts pages from 0, except deleting pages, which the vendor’s own docs mark as the one 1-based exception.
The app covers a well-documented core of PDF.co’s roughly 67 endpoints rather than every conversion permutation; less common format conversions and narrower extraction endpoints are left for a later pass.
Three routes to the same 24 actions. The Workflow tab is generated from PDF.co's own manifest and carries its real ids, so it is copy-pasteable; the Code and CLI examples are the same call for any action on any app, so every app-specific value in them is a blank you fill in.
account-balance-get Read the number of PDF.co credits remaining on this account.
barcode-generate Render a barcode (QR code, PDF417, Code128, EAN13, …) image encoding a value.
barcode-read Detect and decode barcodes (QR, PDF417, Code128, EAN, UPC, …) in a PDF or image.
file-hash Compute a hash of a file at a URL, for verifying it hasn't changed between steps. PDF.co's own docs call this an MD5 hash, but its worked example returns a 64-character (SHA-256-length) digest, not a 32-character MD5 one — treat the algorithm as unconfirmed rather than trusting the vendor's own label.
file-upload-from-url Fetch a file from a URL and copy it into PDF.co's temporary storage, returning a new URL other PDF.co actions can reference.
job-check Poll the status of a job started with async: true on another PDF.co action. status is one of working, success, failed, or aborted.
pdf-add Overlay text, images, or other PDFs onto a PDF, and/or fill values into an existing PDF form's fields.
pdf-add-password Encrypt a PDF with an owner and/or user password, and optionally restrict printing, editing, form-filling, content extraction, or assembly.
pdf-delete-pages Remove one or more pages from a PDF. Page numbers here are 1-based (page 1 is the first page) — this is the one endpoint in this app that is not 0-based.
pdf-find Search a PDF for text (or a regular expression) and return every match's position and surrounding context.
pdf-forms-info List fillable form fields (text boxes, checkboxes, radio buttons, combo boxes) in a PDF form, for use with the PDF Add action.
pdf-from-html Render raw HTML (including any JavaScript it triggers on load) to a PDF file.
pdf-remove-password Remove an existing password and any restrictions from a PDF.
pdf-to-jpg Rasterize PDF pages as JPG images. Returns one image URL per rendered page.
pdf-to-json Extract text and layout from a PDF as structured JSON (lines, positions, fonts).
pdf-to-text Extract text from a PDF (or scanned image) with layout preserved, using OCR.
A workflow step names the app and the action, and the editor fills in the
connection when you pick one. This is the Step shape from the
workflow spec, carrying PDF.co's real ids.
{
"manifestVersion": "2",
"name": "pdfco-example",
"steps": [
{
"id": "barcode-generate",
"uses": {
"app": "io.w6w.pdfco",
"action": "barcode-generate",
"connection": "conn_YOUR_CONNECTION_ID"
},
"with": {
"value": "<value>",
"type": "<type>"
}
}
]
}barcode-generate account-balance-get barcode-read file-hash file-upload-from-url +19 more actions available
Every app-specific value here is a blank you have to fill in. An
app action is reached through the connection that authenticates it, so the
address is a connection id, not the app id — and connections belong to your account,
so a public page cannot know yours. Create one for PDF.co, then fill in
the three blanks: conn_YOUR_CONNECTION_ID, the action key, and the
parameters that action declares. The call itself is real — the shape is transcribed
from the studio's own snippet builder, which prints the same kind of blanks — but
nothing in it is specific to PDF.co. The Workflow tab is where this app's
real ids are.
npm install @w6w/sdkyarn add @w6w/sdkpnpm add @w6w/sdkdeno add npm:@w6w/sdkimport { W6wClient, isActionRun } from "@w6w/sdk";
// Reads W6W_BASE_URL and W6W_TOKEN from the environment when omitted.
const client = new W6wClient();
const envelope = await client.run({
urn: "conn_YOUR_CONNECTION_ID",
action: "barcode-generate",
payload: {
value: "<value>",
type: "<value>",
// decorationImage: "<value>",
// inline: "<value>",
// async: "<value>",
// name: "<value>",
// expiration: "<value>",
// profiles: "<value>",
},
});
if (isActionRun(envelope)) console.log(envelope.value); npm install -g @w6w/cli w6w run conn_YOUR_CONNECTION_ID --action barcode-generate --payload '{"value":"<value>","type":"<value>"}' Give an AI agent PDF.co — without giving it PDF.co's credentials. One MCP endpoint exposes every app, function and workflow the caller is entitled to, as tools it can discover and run. Access is granted per team while we onboard.
One tool call{
"name": "w6w_invoke",
"arguments": {
"ref": "app:io.w6w.pdfco#barcode-generate",
"input": {
"value": "<value>",
"type": "<type>"
}
}
}
Every tool names its target with a single ref. The
app: form above doesn't name a connection at all — the
host resolves which of the caller's PDF.co connections to sign
with, and refuses rather than guesses when the answer is ambiguous.
The token is attached host-side, at the moment of the call. It is never a tool argument, never in the model's context, and never in a transcript — so a prompt injection has nothing to exfiltrate.
Tools are derived per end user from what that person has actually connected and is entitled to — not one shared bot identity carrying the union of everyone's access.
Multi-step work runs on the workflow engine and returns a run handle the agent can poll — retries, branching and state survive the conversation that started them.
PDF.co's declared health checks are on the surface too, so an agent can tell "the vendor is down" from "your credential expired" before it burns a retry on either.
The MCP surface is part of the hosted platform. PDF.co itself is MIT, and the runtime that executes it is source-available (FSL).
PDF.co declares its own checks, so its health is a property of the app rather than something the host guesses at.
PDF.co publishes no status page — see `unavailable.reason`.
Remaining PDF.co credits, read from GET /v1/account/credit/balance. PDF.co publishes no plan ceiling via this API, so only a remaining count is reported.