Output & previews
Output & previews
Choose an output format
| Input | Output | Requirements |
|---|---|---|
| DOCX | DOCX | Native Word population |
| XLSX | XLSX | Native Excel population |
| Supported AcroForm text fields | ||
| DOCX or XLSX | Enabled and available Office-to-PDF renderer |
PDF-to-Office and cross-Office conversion are not supported. To populate and render in a single call, set generation options.outputFormat to Pdf. To convert without replacement, use the convert endpoint.
The isolated LibreOffice renderer is disabled by default and requires a supported runtime. Enabling a setting alone does not provide that runtime. Confirm fonts, pagination, and customer-template fidelity before rollout. An unavailable renderer returns an explicit error rather than an incomplete document.
Choose delivery
| Setting | Result |
|---|---|
delivery: Binary |
File bytes |
delivery: Json |
Base64 content with metadata, counts, and warnings |
delivery: Preview |
Expiring links when the API enables preview storage |
disposition: Attachment |
Download the binary result |
disposition: Inline |
Ask the browser to display the result; Office-file display is not guaranteed |
Use safe ASCII filename characters, up to 128 characters. The server chooses the extension from the output format.
Preview privacy
PDF preview in the web workbench uses a local browser blob URL and bundled PDF.js, with page and zoom controls. It does not send the PDF to a third-party viewer.
Word/Excel preview uses Microsoft’s external Office viewer. Generating a preview requires allowExternalPreview: true because Microsoft receives the generated document. Private uploads retain an unchecked explicit-consent control. Fixed public samples may have preview selected by default when available.
Use download-only for confidential content unless sharing is approved. Microsoft can cache a fetched document beyond Cloudwell’s link expiry.
Expiring Office links
Preview responses include contentUrl, officeViewerUrl, expiresAt, filename/MIME, counts, and warnings. The content URL is an anonymous, token-bearing read link: anyone with the URL can access it until expiry. Treat it like a secret and keep it out of logs.
The preview API must have a trusted, publicly reachable HTTPS origin. Localhost and private-network-only origins cannot be fetched by Microsoft’s viewer. No API key is sent to Microsoft.
The initial store is process-local memory, with defaults of 10-minute retention, 32 documents, and 100 MiB. Restarts discard links. Expired bytes are removed during requests and by a cleanup worker. Multi-instance deployments need shared storage and expiring read access before these links can be reliable across instances.
Download remains available if the viewer cannot render the file. Preview enablement does not enable PDF conversion; they are separate capabilities.