Skip to main content
To generate a Word file from Python without templates, send your content as Markdown (or a sentence) to Doconda and get back the laid-out .docx with its PDF. You write no code for paragraphs, styles or tables: you describe the look in one sentence (style), and it’s applied to Word’s styles, so the file stays editable.

Why python-docx gets costly

  • Every heading, list and table is code: a new section means changing the program.
  • .docx templates have to be designed, versioned and kept in sync with their placeholders.
  • Formatting applied paragraph by paragraph looks right but is hard to edit later in Word.
  • Tables that overflow the page, or headings stranded at the bottom of a page, only show when you open the file.

Create the Word file

create() waits until the document finishes, so the script prints ready and saves note.docx. Its PDF comes with doconda.documents.download(doc["id"], "pdf").
  • Your text, as is: the Markdown supports headings, paragraphs, lists, tables, bold and italics, links, page breaks and images.
  • The look in style: up to 1,000 characters in plain language. Fonts, colours and page numbers go on Word’s styles (Normal, Heading 1…), never paragraph by paragraph.
  • No content of your own: ask for the document in a sentence instead, with prompt="Residential lease agreement for €900 a month".
  • Checked before delivery: the agent checks the file and its rendered pages and fixes what it finds. A document that can’t be delivered ends in failed and isn’t charged.

FAQ

Install the SDK (pip install doconda) and call documents.create with format="docx" and your Markdown in content. The look goes in style, in plain language. No template file is needed.
Yes. Style is applied to Word’s styles (Normal, Heading 1…), not paragraph by paragraph. Change a style in Word and the whole document follows.
Yes. The Markdown supports headings, paragraphs, lists, tables, bold and italics, links, page breaks and images, and the text is used as is. For a plain conversion with no AI, see convert.