# Collaboration

- Human documentation: [https://docs.univer.ai/guides/pdfs/features/collaboration](https://docs.univer.ai/guides/pdfs/features/collaboration)

- Agent Markdown: [https://docs.univer.ai/guides/pdfs/features/collaboration.md](https://docs.univer.ai/guides/pdfs/features/collaboration.md)

- Requested language: `en-US`

- Content language: `en-US`

- Documentation version: `1.0.0-rc.0`

- Source: [pdfs/features/collaboration.mdx](https://github.com/dream-num/documentation/blob/dev/content/guides/pdfs/features/collaboration.mdx)

---

Follow [Collaboration integration](https://docs.univer.ai/server/collaboration/browser-integration.md) to run the official example, connect your application, and verify persistence and authorization. Implementation details and runnable Web/Server examples are maintained at [Univer Office](https://docs.univer.ai/server/collaboration/quick-start.md).

Create the Unit through an authenticated business API calling Collaboration Service, then load the returned identifier in the browser. Configure HTTP, Session Ticket, and WebSocket entry points together using [Quick Start](https://docs.univer.ai/server/collaboration/quick-start.md). Persist data with a Database Adapter and enforce read, JOIN, and edit policies through [server middleware](https://docs.univer.ai/server/collaboration/identity-and-authorization.md).

> [!NOTE]
> Before using these APIs, verify that your target backend supports PDF Units. A working Sheets collaboration example does not establish PDF support.

## Load a collaborative PDF

After creating a PDF unit through the server API or `importPdfToUnitIdAsync`, load it with the collaboration Facade:

```ts
const pdf = await univerAPI.getCollaboration().loadPdfAsync(unitId)

if (!pdf) {
  throw new Error(`PDF unit not found: ${unitId}`)
}

console.log(pdf.getId(), pdf.getName())
```

`loadPdfAsync` loads the server snapshot, prepares the collaboration session, and returns an `FPdf`. It returns `null` when the unit cannot be associated with a PDF.
