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
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.
Paper size. Default ‘letter’; use ‘a4’ outside the US/Canada or when the user asks.