> ## Documentation Index
> Fetch the complete documentation index at: https://docs.okrapdf.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Deterministic Delivery

> Cloudinary-style PDF asset delivery with immutable URLs and cache-safe variants

## Why this demo exists

PDF products often break at delivery time, not extraction time: variant sprawl, unclear cache keys, and brittle invalidation.

This pattern uses OkraPDF URL grammar and deterministic profile tokens so every page/image artifact has a stable path.

## What it proves

1. Define named image/page profiles (`thumb`, `card`, `hero`, `print`).
2. Generate canonical transform tokens from profile config.
3. Serve immutable URLs through edge/CDN with predictable cache behavior.
4. Promote hot variants to materialized paths when traffic justifies it.

## Cloudinary technique transfer for PDFs

You keep the same ergonomics teams love in image pipelines:

* URL-driven transforms
* deterministic outputs
* strong CDN cacheability
* explicit profile contracts across frontend + backend

But the outputs are PDF-native assets and structured document artifacts.

## Demo Source

`runtime-demo/demos/04-cloudinary-technique-transfer.ts`\
`runtime-demo/demos/05-pipeline-sweet-spot.ts`\
`runtime-demo/apps/vercel-pdf-pipeline-starter`

## Delivery architecture

```mermaid theme={null}
flowchart LR
    A[Source PDF] --> B[Okra Extract + Metadata]
    B --> C[URL Builder]
    C --> D[Deterministic Variant Route]
    D --> E[CDN Cache]
    E --> F[Web App]

    style A fill:#1e293b,color:#f8fafc,stroke:#475569
    style B fill:#FFE01B,color:#1e293b,stroke:#E6C800
    style C fill:#0ea5e9,color:#fff,stroke:#0284c7
    style D fill:#16a34a,color:#fff,stroke:#15803d
    style E fill:#16a34a,color:#fff,stroke:#15803d
    style F fill:#334155,color:#f8fafc,stroke:#475569
```

## Related Docs

<CardGroup cols={2}>
  <Card title="URL Builder" icon="link" href="/cookbook/url-builder">
    Build document/page/entity URLs with zero API calls.
  </Card>

  <Card title="Upload → Extract → Publish" icon="upload" href="/cookbook/upload-extract-publish">
    Reference deploy flow for production document delivery.
  </Card>
</CardGroup>
