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

# Create pdf document

> Create a NEW PDF document in a HERO project — a real, paginated PDF file that opens in HERO's PDF viewer and downloads as .pdf. Two modes (exactly one): …

`create_pdf_document`

Create a NEW PDF document in a HERO project — a real, paginated PDF file that opens in HERO's PDF viewer and downloads as .pdf. Two modes (exactly one): - `markdown` — render content you compose. Accepts the same HERO extended markdown as write\_document\_markdown (headings, @clause numbering, lists, tables, blockquotes, bold/italic, links, signature lines). A PDF is static: write the FINAL text with real values — no \{\{placeholder:...}} atoms or \[BRACKETS]. Gather the facts first from the project (list\_project\_documents, read\_document\_text, get\_table\_data / lookup\_table\_cells). - `sourceDocumentId` — render an existing HERO document (or convert a Word document) as it currently stands; clause numbering, tables and placeholder values are filled in from the project. Use this for 'export / save / turn X into a PDF'. Defaults to the source document's project and folder. Put the PDF where it belongs: the project (and folder via parentId) the user named or the conversation is about; ask if it is ambiguous. Only use this when the user wants a PDF — for normal drafting create native HERO documents (create\_document + write\_document\_markdown). To bring in an EXISTING file, use import\_file. Each call makes a new PDF: to redo one you made earlier in this conversation (longer, corrected), pass it as `replaces`.

## Parameters

**title** `string`

Document name in HERO and the PDF's title metadata. Not drawn on the page — put a heading in the markdown for that. Defaults to the first heading, or the source document's name.

**markdown** `string`

Full PDF content as HERO extended markdown. Mutually exclusive with sourceDocumentId.

**sourceDocumentId** `string`

Existing HERO editor or Word document to render as a PDF. Mutually exclusive with markdown.

**pageSize** `string, enum: 'letter' | 'a4'`

Paper size. Default 'letter'; use 'a4' outside the US/Canada or when the user asks.

**fontFamily** `string, enum: 'sans' | 'serif'`

Typeface. Default 'sans'; 'serif' suits formal legal documents.

**projectId** `string`

Project to create the PDF in.

**parentId** `string`

Folder (or document) to file it under. Omit for the project root.

**replaces** `string`

documentId of a PDF you created earlier in this conversation that this one supersedes. The new PDF takes its place, and the old one goes to the trash (undo brings it back).


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