declarations_download_pdf
Generate the ANAF-compliant declaration PDF for manual submission via SPV or e-guvernare. Runs Storno's rules and ANAF's validator, then writes the PDF to the target file.
Instructions
The PDF ANAF accepts for this declaration (DUKIntegrator's form with the XML embedded and, for C168, the attachment zip), generated on demand from the current data. Use it when the user files by hand: they upload this file in SPV (persoane fizice: SPV → Depunere declarații) or on the e-guvernare portal with their own certificate. Written to outFile. Storno's rules and ANAF's validator run first; errors come back instead of a broken file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Declaration UUID | |
| outFile | Yes | Where to write the PDF | |
| refresh | No | Regenerate even if a PDF was already produced (drafts only) | |
| companyId | No | Company UUID (overrides STORNO_COMPANY_ID env var) |