Invoices and reports, on every platform
Like RDLC or Crystal Reports, without Windows or license fees. Design the report in your browser, then render it to PDF from your app or server.


- Designin the report designer: bands, tables, groups, totals, logo, QR code
- Exporta small
.fjttemplate file for your app or server - Renderwith your data, to PDF or on screen, in any language below
Render your first invoice
Pick your platform. Every sample renders the same invoice template with the same data.
flutter pub add fajfield_reports_flutterimport 'package:fajfield_reports_flutter/fajfield_reports_flutter.dart';
final report = FjReport.fromJsonString(
await rootBundle.loadString('assets/invoice.fjt'));
final data = {
'customer': {'name': 'Fresh Mart', 'address': 'Dubai'},
'invoice': {'no': 'INV-0452', 'date': '2026-11-30'},
'items': [{'name': 'Basmati rice 5 kg', 'qty': 4, 'rate': 18, 'taxRate': 0.05}],
};
// On screen
FjReportView(report: report, data: data)
// PDF: print or share it (with the printing package)
final result = await FlutterReportRenderer().render(report, data: data);
await Printing.layoutPdf(onLayout: (_) async => result.pdf);Fully offline. Flutter draws the text, so Arabic, Malayalam, Hindi and every other script print correctly.
dart pub add fajfield_reportsimport 'dart:io';
import 'package:fajfield_reports/fajfield_reports.dart';
final report = FjReport.fromJsonString(File('invoice.fjt').readAsStringSync());
final result = await ReportRenderer().render(report, data: {
'customer': {'name': 'Fresh Mart', 'address': 'Dubai'},
'invoice': {'no': 'INV-0452', 'date': '2026-11-30'},
'items': [{'name': 'Basmati rice 5 kg', 'qty': 4, 'rate': 18, 'taxRate': 0.05}],
});
File('invoice.pdf').writeAsBytesSync(result.pdf);
print(result); // pages, size and any warningsPure Dart for servers and command-line tools. Real, selectable text with its own small PDF writer.
npm install @fajfield/reportsimport { renderPdf } from '@fajfield/reports';
const template = await (await fetch('/templates/invoice.fjt')).text();
const { pdf, warnings } = await renderPdf(template, {
customer: { name: 'Fresh Mart', address: 'Dubai' },
invoice: { no: 'INV-0452', date: '2026-11-30' },
items: [{ name: 'Basmati rice 5 kg', qty: 4, rate: 18, taxRate: 0.05 }],
});
// Browser: download it
const url = URL.createObjectURL(new Blob([pdf], { type: 'application/pdf' }));
// Node: fs.writeFileSync('invoice.pdf', pdf)Node 18+ and every modern browser: React, Angular, Vue, Next.js, Electron. For Arabic and other scripts in the browser, use renderPdfPictures() from @fajfield/reports/canvas.
dotnet add package Fajfield.Reportsusing Fajfield.Reports;
var reports = new ReportClient("http://localhost:8080", "change-me");
byte[] pdf = await reports.RenderAsync("invoice", new
{
Customer = new { Name = "Fresh Mart", Address = "Dubai" },
Invoice = new { No = "INV-0452", Date = DateTime.Today },
Items = order.Lines.Select(l => new { l.Name, l.Qty, Rate = l.Price, TaxRate = 0.05m }),
});
return File(pdf, "application/pdf"); // ASP.NET.NET Framework 4.6.1+ and .NET 6/8+. Talks to a report server you run yourself. Property names become camelCase to match the designer.
pip install fajfield-reportsfrom fajfield_reports import ReportClient
client = ReportClient("http://localhost:8080", api_key="change-me")
client.render_to_file("invoice", {
"customer": {"name": "Fresh Mart", "address": "Dubai"},
"invoice": {"no": "INV-0452", "date": date.today()},
"items": [{"name": "Basmati rice 5 kg", "qty": 4, "rate": Decimal("18"), "taxRate": 0.05}],
}, "invoice.pdf")Django, Flask, FastAPI and scripts. No dependencies. Decimal and dates are converted for you. Talks to a report server you run yourself.
docker run -p 8080:8080 -e API_KEYS=change-me -v ./templates:/templates fajfield/reports-servercurl -X POST http://localhost:8080/render \
-H "Authorization: Bearer change-me" \
-H "Content-Type: application/json" \
-d '{
"template": "invoice",
"data": {
"customer": { "name": "Fresh Mart", "address": "Dubai" },
"invoice": { "no": "INV-0452", "date": "2026-11-30" },
"items": [{ "name": "Basmati rice 5 kg", "qty": 4, "rate": 18, "taxRate": 0.05 }]
}
}' -o invoice.pdfJava, PHP, Go, Ruby or anything that can make an HTTP request. No Docker? npx @fajfield/reports-server serve runs the same server with Node.
Packages
| Platform | Package | Good for |
|---|---|---|
| Flutter apps | fajfield_reports_flutter | Offline, on screen and PDF, every language |
| Dart servers and tools | fajfield_reports | The engine with a real-text PDF writer |
| Web and Node.js | @fajfield/reports | Browser previews and PDFs, Node servers |
| .NET and .NET Framework | Fajfield.Reports | ASP.NET, WinForms, WPF, services |
| Python | fajfield-reports | Django, Flask, FastAPI, scripts |
| Any language, self-hosted | fajfield/reports-server | HTTP report server, Docker or Node |
What reports can do
Pages that flow
Tables continue onto new pages with the header repeated. A row never splits; the totals row stays with the last row.
Groups and subtotals
Group rows by customer, category or month, with a header and a subtotal for each. Nest them, sort by total, or start each on a new page.
Text that grows
Long addresses, notes and terms make their box taller and push everything below down, onto the next page if needed.
Totals and expressions
sum, count, avg, conditions and number, currency and date formats, in any locale.
Charts and codes
Bar, line and pie charts, barcodes, QR codes, pictures and logos.
Never in the dark
Missing data, bad expressions and invalid barcodes come back as plain-sentence warnings, never a crash.
The report server
For .NET, Python, Java, PHP or any language: run it once on your own machine or cloud, then send it a template name and your data. Your invoices never leave your network.
Run it
docker run -d --name fajfield-reports -p 8080:8080 \
-e API_KEYS=change-me \
-v ./templates:/templates \
fajfield/reports-servernpx @fajfield/reports-server serve --port 8080 --templates ./templates
# or render one file, for scripts and batch jobs:
npx @fajfield/reports-server render invoice.fjt data.json -o invoice.pdfPut your .fjt files in the templates folder and render them by name, or send the whole template in the request.
Endpoints
POST /render | Template and data in, PDF out. ?format=json returns { pdf: base64, pages, warnings }; ?download=1 and ?filename= name the file. |
GET /templates | Names of the .fjt files in the templates folder. |
GET /health | Is the server up, and how busy. No key needed. |
Warnings (missing data, bad barcodes) come in the X-Fajfield-Warnings header. Errors come back as { "error": "…" } with a plain sentence: 400 bad request, 401 wrong key, 404 unknown template, 413 too large, 504 too slow.
Settings
| Variable | Default | |
|---|---|---|
API_KEYS | none | Comma-separated keys. Clients send Authorization: Bearer KEY. Set this before exposing the server. |
TEMPLATES_DIR | /templates | Folder of .fjt files, rendered by name. Edits are picked up without a restart. |
PORT | 8080 | |
MAX_BODY_MB | 10 | Largest request accepted. |
TIMEOUT_MS | 30000 | Longest a render may take. |
CONCURRENCY | 4 | Renders at the same time; others wait their turn. |
CORS_ORIGIN | off | Allow a web page on this origin to call the server directly. |
The designer
Works like a desktop report builder, free in the browser: draw items, resize them from every side, snap to guides, right-click for more, and switch to View to see the real pages with sample data.
- Bands: page header and footer, report header, body, report footer
- Text, table, chart, picture, line, rectangle, ellipse, barcode, QR code, page number, date, signature
- Groups with subtotals, text boxes that grow, column formats, totals rows, “show only if” rules
- Sizes in mm, cm, inches or pixels; A4, Letter, Legal or custom pages


Your data
The template lists its datasets. Send one object with a key for each: a list for table rows and chart points, an object for single records like company, customer and invoice.
{
"company": { "name": "Harbour Foods Co.", "taxId": "TRN 100234567800003" },
"customer": { "name": "Fresh Mart", "address": "14 Marine Drive, Dubai" },
"invoice": { "no": "INV-0452", "date": "2026-11-30" },
"items": [
{ "name": "Basmati rice 5 kg", "qty": 4, "rate": 18, "taxRate": 0.05 },
{ "name": "Olive oil 500 ml", "qty": 6, "rate": 7.9, "taxRate": 0.05 }
]
}Missing a dataset? You get a warning naming it, and the PDF is still made. In Flutter, QueryDataSource loads each dataset from sqflite, drift, Hive, Isar or REST.
Expressions
Anything in {{ }} is a field or a small, safe expression. It is parsed, never run as code, and works the same on every platform.
{{customer.name}}a field; dots reach into nested data{{qty * rate * (1 + taxRate)}}maths{{sum(items.qty * items.rate)}}sum, count, avg, min, max over a list{{format(total, 'currency')}}currency, number, percent, date, 0.00{{qty < reorder ? 'Reorder' : 'OK'}}conditions{{group}}the value of the current group (in group headers and subtotals)Page {{page}} of {{pages}}page numbersQuestions
Is it like RDLC or Crystal Reports?
Yes. The designer is the report builder and the packages are the viewer: bands, tables, groups, expressions, totals and page numbers work the way report developers expect. The difference: no Windows, no ReportViewer, no license fee, and it runs offline on phones too.
Which package do I add?
Flutter apps: fajfield_reports_flutter. Dart servers: fajfield_reports. Web and Node: @fajfield/reports. .NET, Python, Java, PHP and others: run the report server and call it, with the .NET or Python package or plain HTTP.
Does my data leave my network?
No. The Flutter, Dart and JavaScript packages render on the device or your server. The report server runs on your own machine or cloud account. Nothing is sent to Fajfield.
What about Arabic, Malayalam and Hindi?
Flutter prints every language perfectly, and so does the browser with renderPdfPictures(). The Dart, Node and report server PDFs use the standard PDF fonts, which cover English and Western European text; other scripts there are coming.
Is the PDF text selectable?
Yes, in the standard-font PDFs (Dart, JavaScript, server). For other scripts, Flutter and the browser picture mode draw each page as a sharp image, so it looks exactly like the screen.
Can business users change the invoice layout?
Yes. Templates are files. Load them from your server and a new layout from the designer is used without releasing a new app.
What does it cost?
Every package and the report server are free and open source (MIT), including for commercial use. The designer is free to start, with advanced features in Fajfield Pro.
Printing receipts and labels on thermal printers? See thermal printing. Everything for developers: Developers.