Building documents
What goes into a Format document, and how to produce it.
Format's API takes one required input, the document model expressed as HTML, plus an optional assets bundle holding the images, fonts, and stylesheets it references. The HTML carries the model's types (a Document holding Layouts, each Layout holding Flows), and Format renders it into a finished PDF.
How you produce that HTML is your choice. The recommended path is Studio, which compiles HTML from your source code with live preview. Format does not require it: the React and Vue SDKs render the HTML programmatically, server-side templates output it directly, and you can hand-write it.
With Studio
Studio is the recommended way to build Format documents. It's a local development environment with live preview: edit a file, save, and the preview refreshes in your browser. Page breaks, fonts, styles, layout decisions are all visible as you make them.
It also catches broken layouts during development rather than in production, and ships a CLI and a bundler plugin for production PDF generation.
For most projects, this is where you should start. The Quick start walks through installing it.
Without Studio
The Format API does not require Studio. Your HTML can come from the React SDK (renderToStaticMarkup), the Vue SDK (renderToString), or from any server-side template that produces HTML. You can also hand-write the model HTML directly; the document model defines the expected structure.
This fits when you're generating documents inside an existing application with a legacy build system, or working in an environment where adding Studio isn't an option. The trade-off is the development loop: no live preview, so iteration means rendering the document via the API and checking the PDF output.