Build Brand-New PDFs From Your Data

#Document Creation #PDF Creation #Document Automation
Published October 1, 2026

Most business information starts out as data: rows in a spreadsheet, fields in a form, records in a database. But the people who need it, such as customers, auditors, and regulators, usually want a document. A clean, consistent, shareable PDF is still the standard way to hand over something official.

The gap between "data in a system" and "finished document" is where a lot of time gets lost. People copy and paste into templates, fix formatting by hand, and re-check numbers they've already entered once. Generating the PDF directly from the data removes that step.

What we built as an example

To show what this looks like in practice, we created a sample that produces a Field Service Inspection Report, the kind of document a technician delivers after an annual equipment visit. The PDF is created from scratch, not filled into a template or converted from another file format.

The finished report is three pages and includes:

  • An inspection summary with the customer, site, inspector, date, equipment, and an "Attention Required" status
  • A findings table with each issue's ID, category, location, severity, description, recommended action, and status
  • Photographic evidence with captions
  • A closing certification
  • A consistent header, footer, and page number on every page

None of it was laid out by hand. It was assembled from three simple inputs.

Three inputs, one finished document

InputWhat it provides
A JSON fileReport details: customer, site, inspector, summary
A CSV fileFindings, one row per issue
A folder of imagesPhoto evidence, with captions

Data in a form like this is easy to export from the tools teams already use: inspection apps, field-service platforms, databases, and spreadsheets. If you can produce a JSON or CSV file, you can produce a report.

It also scales without extra effort. Add another row to the findings file, and the table grows to fit. If it runs past the bottom of the page, it continues on the next one with the column headers repeated, as you can see on page 2 of the sample report.

Why generate PDFs programmatically?

Consistency. Every document follows the same structure, fonts, colors, and branding, whether it's the first or the ten-thousandth.

Speed. The document is ready the moment the data is. No one has to open a template or adjust a table.

Accuracy. Content flows straight from the source, so there's no retyping and far less risk of transcription errors.

Control. Because the document is built from code, you decide exactly what goes where. That includes text, tables, lines, images, and page breaks.

Scale and automation. The same logic can run once on demand, on a schedule, or automatically when a form is submitted or a job closes.

What it takes under the hood

The sample is written in C# on .NET 10 and uses the Datalogics Adobe PDF Library (APDFL) to build the PDF. At a high level, it shows how to:

  • Create a document and add pages
  • Place text in different fonts and sizes
  • Draw lines and shapes for table borders and accents
  • Embed and position images with captions
  • Wrap text inside table cells
  • Paginate automatically and repeat headers, footers, and page numbers

The code is split into a few clear pieces: one for reading the inputs, one for the report layout, and one for managing pages, bounds, and text wrapping. That makes it a practical starting point if you want to adapt the layout to your own documents.

Evaluators can try it with the LM package from NuGet and a trial activation key from Datalogics. Licensed customers use the non-LM package from their approved feed. Either way, a default run reads the sample data and writes field-service-inspection-report.pdf to your working folder. The README on GitHub has the exact steps.

The same approach works for many documents

An inspection report is one example of a broader pattern: structured data in, professional document out. The same technique fits:

  • Safety, compliance, and quality audits
  • Property, vehicle, and insurance condition reports
  • Invoices, statements, and quotes with line items that span pages
  • Maintenance and service histories for individual assets
  • Certificates, summaries, and formal records
  • Any recurring report that is currently assembled by hand

If you have a document that is built from the same kinds of information every time, it's a good candidate.

Try the sample

The full sample, including the fictional data and images used in the report above, is available on GitHub in the FieldServiceInspectionReport folder of the Datalogics additional APDFL C# .NET samples repository. Clone it, swap in your own data, and see how quickly it becomes a finished PDF.

Have a document in mind? Contact the Datalogics team to talk through your use case.