Skip to content

SDK Quickstart

Use @aoexl/sign when you want to embed signing directly inside your product UI.

This path was validated in a real external React app in this repo:

  • consumer app: sdk-consumer-smoke
  • viewer host: sdk-consumer-smoke/src/main.jsx

What You Get

  • embedded PDF viewer and signer
  • signature popup flow
  • save callback to your app
  • document-loaded and completion callbacks
  • mobile-aware signing UI from the same engine used by the hosted app

Install

bash
npm install @aoexl/sign

Minimal React Example

jsx
import { AoexlViewer } from "@aoexl/sign";

export default function MerchantOnboardingDemo() {
  return (
    <AoexlViewer
      licenseKey="pk_test_local"
      engineUrl="/engine.js"
      pdfUrl="/Merchant.pdf"
      fileName="Merchant.pdf"
      mode="sign"
      signerInfo={{ name: "SDK Smoke Tester", email: "sdk-smoke@example.com" }}
      config={{
        enableSignatureIndicator: true,
        signatureIndicatorPosition: "top-right",
        autoJumpNextSign: false,
      }}
      onDocumentLoaded={(info) => console.log("document-loaded", info)}
      onSave={(result) => console.log("save", result)}
      onAllSigned={(result) => console.log("all-signed", result)}
      onComplete={(result) => console.log("complete", result)}
      onError={(error) => console.error("aoexl-error", error)}
    />
  );
}

Required Inputs

PropPurpose
licenseKeyYour Aoexl signing key
engineUrlURL to the built engine.js bundle
pdfUrlPDF to render/sign
modesign for signer-first UX

Event Flow

  1. onDocumentLoaded
  2. signer opens a signature field
  3. signer applies signature
  4. onSave
  5. onAllSigned when all required signature fields are completed

Hosting The Engine

The SDK shell package loads the viewer engine separately.

For local development:

txt
/engine.js

For production:

  • host engine.js on your CDN or app origin
  • point engineUrl to that asset

Where Signing Requests Fit

Use the SDK when you want the signing UX inside your own app.

Use hosted signing requests when:

  • the signer is external
  • you want email-based signing links
  • you want server-tracked request records and webhook completion flow

Related docs:

Current Notes

  • the SDK render/sign/save path is working in a real React host app
  • if you pitch embedding, use this guide instead of the older generic docs page
  • if you need framework-specific wrappers next, React should be the first fully documented path

Built for product, engineering, and operations teams shipping PDF signing flows.