> ## Documentation Index
> Fetch the complete documentation index at: https://docs.doconda.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How do I apply my brand style to generated documents?

> Describe your brand's font and colors in style, or pass one of your files in sources to copy its design: fonts, colors, logo and cover page.

To apply your brand style, describe its font and colors in `style` ("Montserrat font, headings #1F3A5F, accent
\#E4572E"), or pass a file with your design in `sources` and ask for "our template's design". With a file, Doconda
copies its fonts, colors, margins, header and footer, logo and cover page.

## Steps

1. Store your API key in `DOCONDA_API_KEY` and install the SDK (`pip install doconda` or `npm install @doconda/sdk`).
2. Upload a file with your design (a Word file, a presentation, an Excel file, a PDF or an image).
3. Create the document with `quality: "standard"` and say in the request that it should use that design.

<CodeGroup>
  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
  from pathlib import Path
  from doconda import Doconda

  doconda = Doconda()  # reads the key from DOCONDA_API_KEY
  template = doconda.files.upload("brand-template.docx")
  doc = doconda.documents.create(
      format="docx",
      prompt="Sales proposal for a logistics client, with our template's design",
      sources=[template["id"]],
      quality="standard",
  )
  Path("proposal.docx").write_bytes(doconda.documents.download(doc["id"], "docx"))
  ```

  ```ts TypeScript theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
  import { readFile, writeFile } from "node:fs/promises"
  import { Doconda } from "@doconda/sdk"

  const doconda = new Doconda()
  const template = await doconda.files.upload(await readFile("brand-template.docx"), "brand-template.docx")
  const doc = await doconda.documents.create({
    format: "docx",
    prompt: "Sales proposal for a logistics client, with our template's design",
    sources: [template.id],
    quality: "standard",
  })
  await writeFile("proposal.docx", await doconda.documents.download(doc.id, "docx"))
  ```
</CodeGroup>

Without a template, text is enough: `style: "Montserrat font, headings #1F3A5F, accent #E4572E, footer: My Company
Ltd."`. This works at every level, `fast` included.

## What you can ask for in `style`

* **Font**: any Google Fonts family, plus Calibri, Cambria, Arial, Times New Roman and Courier New.
* **Colors** of the title, the headings, the text or the accent, by name or in hex.
* **Alignment**, size, line spacing, margins and orientation.
* **Cover page, table of contents, page numbers, header and footer.**

## What you get back

* An editable file: the look lives in the document's styles (`Normal`, `Heading 1`…), plus its PDF with the font
  embedded.
* `style_applied`: how the style was understood, and `style_unsupported`: what couldn't be applied.
* The `design.chosen` event says which file was used as the design.

## Limits

* Copying the design of a file needs `standard` or `best`. In `fast` the document comes out with its own design and
  the report says so (`design.not_copied`).
* The Word file uses the font by name: if whoever opens it doesn't have it installed, Word uses a similar one. The PDF
  has it embedded.

## FAQ

<AccordionGroup>
  <Accordion title="Does it work for PowerPoint?">
    Yes. A presentation passed in `sources` is used as a template: the result starts from its slides.
  </Accordion>

  <Accordion title="Can I also pass material for the content?">
    Yes. The design file is the one you name in the request; the rest of `sources` is still material.
  </Accordion>

  <Accordion title="What happens if I ask for something that can't be done?">
    It's not silently ignored: it comes back in `style_unsupported` (for example, "gradient background") and the rest
    is applied.
  </Accordion>
</AccordionGroup>

## Keep reading

* [Style](/en/guides/style) and [Copy the design of a file](/en/guides/create#copy-the-design-of-a-file).
* [Quickstart](/en/quickstart).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.