PDF Association logo

Discover pdfa.org

Key resources

Get involved

How do you find the right PDF technology vendor?
Use the Solution Agent to ask the entire PDF communuity!
The PDF Association celebrates its members’ public statements
of support
for ISO-standardized PDF technology.

Member Area

PDF Generator API rebuilds existing PDFs, including scans, as editable templates

PDF Generator API now rebuilds existing PDFs, including scanned pages, as editable data-driven templates by measuring the source file.

Member NewsOctober 15, 2026
Illustration of an API connecting a code request to a web interface
PDF Generator API rebuilds existing PDFs, including scans, as editable templates
Illustration of an API connecting a code request to a web interface

PDF Generator API now rebuilds existing PDFs, including scanned pages, as editable data-driven templates by measuring the source file.

Member NewsOctober 15, 2026

Michal Liska

About Michal Liska, Actual Reports

DISCLAIMER
The views expressed in this article are those of the author(s) and do not reflect the policies or positions of the PDF Association.

Many organisations no longer have the source of their business documents. The invoice, certificate or statement they send every day exists only as a PDF, and recreating it as a data-driven template has meant rebuilding the layout by hand. PDF Generator API has added an AI template builder that does this reconstruction from the PDF itself, along with two ways for AI agents to use the same capability.

From a fixed-layout PDF to an editable template

The builder works inside the template editor. Users can describe a document in plain language, or upload an existing PDF or Word file of up to 20 MB and have it rebuilt as a template whose variable parts are bound to data fields.

The first version handed the measurements of one page at a time to a language model and let it place each component. That worked for short documents but not for long ones: pages could go missing and content could be invented. In August 2026 the approach was replaced with a deterministic conversion. The whole document is measured first, and the template is then built from those measurements in code, in a single pass. Text, ruled tables, images and their stacking order are placed from what was measured in the PDF, not from what a model recalls of it. The language model is still used afterwards, in conversation, to bind the template to the customer's data.

Scanned documents

A scanned PDF contains an image of text rather than text. The builder now recognises the text on scanned pages before measuring them, so it comes back as editable components, with the page image kept behind them to preserve the visual layout. Recognised text carries no font, weight or colour information and can contain errors, so the user is told when a template was built this way. Text recognition is currently enabled for English and Estonian documents.

Known limitations of the conversion: borderless tables and rotated text are not yet reconstructed, and data binding remains a separate step.

The same capability for AI agents

Two further components make template creation available outside the editor:

  • MCP server. A Model Context Protocol server generated from the platform's OpenAPI specification lets assistants such as Claude, Cursor and Cline read the template schema, validate a template before saving it and generate documents. It runs as a hosted endpoint or locally.
  • Open-source Agent Skill. An MIT-licensed Agent Skill teaches an agent the template format. It extracts text spans, rectangles, lines and images with their geometry from a source PDF, writes the template and matching sample data, and checks the result against the schema, a layout lint and a placeholder cross-check before handing it over. It is aimed at converting whole folders of existing documents.

Models and transparency

The builder can run on models from OpenAI, Anthropic or Google, or on locally hosted models through Ollama. In line with the EU AI Act, the chat panel states that the user is talking to an AI assistant and that results should be reviewed. Templates produced by the builder are ordinary templates: they remain fully editable in the visual editor and generate output with the platform's standard options, including PDF/A-3b.

This post was drafted with the help of AI and reviewed by the PDF Generator API team.


Actual Reports provides a versatile document generation and automation platform, PDF Generator API, to enable developers and companies to streamline their document generation process efficiently. Actual Reports is the same for document generation as Twilio is for messaging or Mailchimp for transactional emails. Our main product is a highly scalable…

Read more

WordPress Cookie Notice by Real Cookie Banner