Afratafreeh Doc Tutorial- 90%
afratafreeh render -t template.afd -d data.json -o output.pdf You should see output.pdf with the dynamic name and today's date. Chapter 3: The Afratafreeh Syntax Deep Dive This section is your cheatsheet. The language is a mixture of Jinja2 and JavaScript expressions. Variables & Filters Modify output using the pipe | operator.
| Error Message | Likely Cause | Solution | |---------------|--------------|----------| | SyntaxError: Unexpected token '%' | Mismatched tags (e.g., {% if closed with endif ) | Use % endif % ; check opening/closing braces. | | KeyError: 'user.email' | Missing data in JSON path. | Use safe navigation: 'No email' | | Cannot find module '@afratafreeh/pdf-renderer' | Missing PDF backend. | Run npm install @afratafreeh/pdf-renderer | | Output truncated at 5000 pages | Loop generating infinite rows. | Check your % for % condition; add [:100] to limit: items[:100] | Afratafreeh Doc Tutorial-
<!DOCTYPE html> <html> <body> <h1>Afratafreeh Tutorial</h1> <p>Hello, user.name ! Your first document is ready.</p> <p>Date: "now" </p> </body> </html> Create data.json : afratafreeh render -t template