Hosted viewer
The hosted viewer shows a document to an authorized viewer session without making the file public. Every page, search and download request is checked against the session and its link policy.
Embedding rules
- Register only exact origins you control.
- Create short-lived embed sessions on your server.
- Never pass an API key to the embedded page.
- Handle expiry and authorization failures as normal states.
What the viewer offers
| Feature | Purpose | Allowed by |
|---|---|---|
| Manifest | Version, page count, permissions and route templates | The viewer session and link policy |
| Pages and thumbnails | Page images | The viewer session |
| Search | Search within the version | The session plus the search permission |
| Download and print | Recipient actions | The link's download and print policy |
| Forms and annotations | Collaboration on the document | The session, version and collaboration permission |
Your responsibilities as host
- Create sessions on your server.
- Register exact parent origins; wildcards are not supported.
- Pass only the session token to the browser, never an API key.
- Check each window message's origin, source, session and command before acting on it.
- Refresh or re-authorize a session through your server.