Start from the statutory form, not a blank page
Some states put the form directly in statute. Texas Estates Code section 203.002 says an affidavit of facts concerning the identity of a decedent's heirs may be in substantially the form it then sets out, in 16 numbered paragraphs: who the affiant is, how long they knew the decedent, the decedent's marital history, children, mother, father, siblings, whether there was a written will, whether there has been an administration of the estate, unpaid debts, unpaid estate or inheritance taxes, and the real property at issue, closing with a sworn jurat and a notary seal block. Starting from that text means your output already reads the way the county expects. Check your own state before you build, because whether a form exists in statute, and whether it is mandatory or merely suggested, varies.
The hard part is the conditionals, not the merge
Read the Texas form closely and it is not a flat fill. Paragraphs 6 and 7, covering the decedent's mother and father, are each prefixed "Include if decedent was not survived by descendants." Paragraph 8, covering siblings, is prefixed "Include if decedent was not survived by descendants or by both mother and father." Paragraphs 9 and 15 are marked optional. Paragraphs 10 and 11 are written as negatives, such as "Decedent died without leaving a written will", each followed by an instruction to modify the statement if the opposite is true. And paragraph 4 has to expand to one entry per child, with the other parent named and either a current address or a date of death plus that child's descendants.
So your data model has to answer structural questions, not just supply strings: did the decedent leave descendants, was there an administration, how many children are there. That narrows the options to two.
Fill a fillable copy of the form. You map your fields to the PDF's AcroForm field names and post values to them. This is the least work when a document really is a fixed grid, which an heirship affidavit is not. Dropping paragraph 8 leaves an empty block on the page, and a five-child estate overflows a box sized for two.
Generate the document from a template you own. Keep the statutory language as text with conditional sections and a repeating block for children, then render to PDF per case, from HTML and CSS, from Markdown, or from a document assembly template. More setup, but every branch comes out as a clean document instead of a form with gaps in it.
Budget for the signature and the recording, not just the file
Generation is the easy half. Texas Estates Code section 203.001 says a court receives the statement as prima facie evidence of heirship only if two things hold: the affidavit was legally executed and acknowledged or sworn to before, and certified by, an officer authorized to take acknowledgments or oaths, and it has been of record for five years or more in the deed records of a county where the property is located or where the decedent was domiciled at death.
That shapes the build in two ways. The document has to reach an officer who can take an oath, so a signature step on its own is not what the statute describes. And because the five year clock runs from the recording, the recording date and the county are data you need to capture and keep, not paperwork you hand off and forget. Ask the county clerk which notarization methods and file formats it accepts before you finalize a template.
If you would rather not build the conditional template engine yourself, Anvil's PDF Services lets you build a template with variable fields and composable clauses and fill it from JSON per case, which covers the include-or-drop paragraph problem without writing a renderer. Whichever route you take, the notary and recording steps are what make the document worth generating.
Back to All Questions