Blog

One engine, two surfaces — conversion and preview from the same core

Why OfficeAPI treats conversion and preview as two outputs of one document engine, and what that means for format coverage in your product.

Definition. OfficeAPI exposes two surfaces from one Rust engine: conversion, which reads a document and writes it in another documented format, and preview, which renders a document for display inside your product. Products usually need one or the other — a different format, or a picture of the file — and planning a feature starts with knowing which.

What is conversion?

Conversion reads a document and writes it as another documented format. The Word, Excel, and PowerPoint families each have their own input and output lists; .docx to PDF, .xlsx to CSV, and .pptx to PDF are the paths most products reach for first. The full list — 42 pairs, 34 input formats, 15 output formats — is in the conversion matrix, generated from the product documentation.

What is preview?

Preview renders a document for display inside your product. It covers 32 extensions across the same three families (13 Word, 11 Excel, 8 PowerPoint), including some that are not conversion inputs, such as .epub, .txt, .ofd, and .xlsb. The full list is on the preview page.

How do the two surfaces compare?

Conversion Preview
Result A new file A rendered view
Documented coverage 42 input/output pairs 32 extensions
Typical use Handoff, export, data extraction Viewing without downloading
Offline Yes Yes
Engine Same Rust core Same Rust core

Why does one engine matter?

  • Consistent parsing. Both surfaces read files through the same core, so a document that converts correctly is read the same way when previewed.
  • One integration. You link one dynamic library or run one process and get both capabilities.
  • One deployment story. Offline, zero dependencies, 6 operating systems, for both features.

How do you plan a document feature?

  1. Start with the surface your users see: keep working with the file elsewhere → conversion; look at it without leaving your product → preview.
  2. Check the matching list. The two lists overlap heavily but are not identical.
  3. Integrate once, through the dynamic library or process invocation, and use it for both.

Frequently asked questions

Can a file be previewed but not converted?

Yes. .epub, .txt, .ofd, and .xlsb are documented preview extensions but not conversion inputs.

Can a file be converted but not previewed?

Yes. PDF is a conversion input and output but is not on the preview list.

Do I need two integrations?

No. One library or one process gives you both surfaces.

Read more

References

See it in the matrix

Check the formats behind the article.

Browse supported formats