Demos

Demos and samples

Fifteen small samples, one per feature area on every SDK it exists for, plus a full demo app on iOS and Android. All of them run from the repository.

The live demo runs the SDK in your browser on a document you choose — nothing is uploaded. The follow-me demo puts two viewers side by side and keeps them in step with the events the SDK emits.

The samples

One app per thing you might want.

Each is a single screen in a single file, so nothing hides behind a framework.

Samples by feature area and platform
ShowsiOSAndroidWebNodeJava
Core — open, text, search, form fields, render, savesamples/core-iossamples/core-androidsamples/core-websamples/core-nodesamples/core-java
AI — summarise, propose redactions, accept; undo on the web and Nodesamples/ai-iossamples/ai-androidsamples/ai-websamples/ai-node—
UI — the viewer with a custom toolbar and themesamples/ui-iossamples/ui-androidsamples/ui-web——
Agents — an MCP client and a WebMCP page——samples/agents-websamples/agents-web—
Pipeline — tag for accessibility, sign, countersign————samples/pipeline-java
DOCX — open a Word file as a PDF, render, save————samples/docx-java

A server has no screen, so there is no UI sample for Node or Java, and the Java SDK has no AI package yet. agents-web fills both of its columns: its MCP client is a Node process talking to the server, and the same tools reach a browser agent through WebMCP.

Web

Four pages and a Node script.

Shell
Build the packages, then serve the repository root
./scripts/fetch-vendor.sh              # PDFium binaries, once
(cd web    && npm install && npm run build)
(cd web-ai && npm install && npm run build)
(cd mcp    && npm install && npm run build)   # for agents-web's node mcp-client.mjs
python3 -m http.server 8000

# then open
# localhost:8000/samples/core-web/    localhost:8000/samples/ai-web/
# localhost:8000/samples/ui-web/      localhost:8000/samples/agents-web/

Core

Document facts, page text, a search count, form fields, page 1 rendered to a canvas and the saved byte size.

AI

Availability, a summary through Chrome’s built-in model where the browser has it, then personal data found by patterns with tick boxes, apply and undo.

UI

The viewer component with a hand-picked toolbar, an app accent colour and a save handler.

Agents

A page that offers the tools to the browser’s agent and runs two of them from buttons, plus node mcp-client.mjs: list tools, open, search, propose redactions, apply two, save to a new file.

iOS and Android

Two commands each.

iOS

Shell
./scripts/fetch-vendor.sh
brew install xcodegen
cd samples/core-ios
xcodegen generate && open CoreSample.xcodeproj

iOS 15+. The sample uses the SDK as a local Swift package from the repository root.

Android

Shell
./scripts/fetch-vendor.sh
cd samples/core-android
gradle installDebug

minSdk 23. The SDK is resolved from the repository through an included build.

On-device AI needs a device

The AI samples show what availability() reports rather than failing: a simulator says the platform is unsupported and most emulators say the device is not eligible. The pattern-based half — redaction suggestions, remediation, flat form detection — works everywhere, with no model at all.

Node and Java

Five scripts, no screen.

A server does not render for a person to look at. These read documents, change them under review, and produce files another system consumes.

Node

Shell
./scripts/fetch-vendor.sh
(cd web    && npm install && npm run build)
(cd node   && npm install && npm run build)
(cd samples/core-node && npm install && npm start)

Node 18+. Nothing to compile: the WebAssembly engine ships inside the package and Node finds it itself.

Java

Shell
./scripts/fetch-vendor.sh
./scripts/build-jni.sh macos           # the native engine; needs Rust 1.92
cd samples/core-java
gradle run

A JDK 17 installed (Gradle builds with a Java 17 toolchain), macOS and Linux. build-jni.sh needs Rust 1.92: rustup toolchain install 1.92, with the aarch64-apple-darwin and x86_64-apple-darwin targets. The Linux libraries need the PDFium engine checkout and Docker, so only maintainers build them. The SDK is resolved from the repository through an included build.

Core — Node

Document facts, page text, a search count, form fields, page 1 written out as a PNG with no image dependency, and the saved byte size.

AI — Node

Personal data found by patterns, a reviewer’s accepted ids applied and nothing else, a report of what left the bytes, then undo. Patterns need no model, which is what makes them useful in a batch job.

Core — Java

The same core API on the JVM, rendering through BufferedImage and ImageIO.

Pipeline — Java

Tag an untagged document for accessibility, sign it, then sign it again — and watch the first signature keep verifying, because the update is appended rather than rewritten.

DOCX — Java

A Word file opened with the same PdfDocument.open call as a PDF: its page text printed, page 1 rendered to a PNG, and the result saved as a PDF.

The full demo

The full demo apps.

ios/Demo and android/demo are complete apps with a screen per API area — editor, viewer, search, outline, thumbnails, annotations, forms, text, signatures, document info, page operations, export, AI and the SDK’s own component. They are how the SDK is exercised by hand, and they run the same way as the samples above.