Auto-Tag Thousands of Bank Statements and Invoices with One PDFix Layout Template

Debit card statement with account summary and transaction details beside stacks of coins, representing accessible banking documents.

Diana Kosovacova
Digital Marketing Lead & PDF Accessibility Evangelist

Connect with Us on LinkedIn

Banks and finance teams produce statements and invoices from the same layout every month. Tagging them by hand doesn’t scale: tagging tables, forms and long documents can take 15–30 minutes per page. Because the layout repeats, these documents are a strong fit for template-based auto-tagging.

For banks that serve EU consumers, the European Accessibility Act has applied to consumer banking services since 28 June 2025. With template-driven auto-tagging in PDFix, you describe a document type once and tag every new statement or invoice of that type the same way. This blog shows how it works on a real bank statement and invoice, with the JSON rules behind it.

Using the PDFix SDK or PDFix Desktop, you can define a single Template JSON file that tells the layout recognition engine exactly:

  • What to detect (headings, tables, logos, addresses, etc.)
  • Where to detect it (via bounding boxes or anchors)
  • How to tag it (as H1, P, Table, Artifacts, etc.)

Once configured, this single template can be applied automatically across thousands of PDF invoices or statements, delivering consistent structure and saving hours of work.

A template fits documents whose layout stays the same, such as monthly statements, invoices and reports from one system. It is not a good fit for one-off PDFs or layouts that change a lot between documents.

Here’s how we used one JSON layout template to auto-tag NovaBank statements – including dynamic headers, branded logos, customer details, tables, and footers – at scale.

JSON Snippet: Defining the Header with Nested Template

This JSON snippet defines virtual elements for tagging content on page 1 of a PDF document using the element_create function.

It demonstrates two primary use cases:

  • Creating a dynamic header region with a nested template
  • Tagging the text in a specific bounding box, so each line of the NovaBank address goes into a single P tag

The nested template (element_template) runs only inside the header region, so the rules for the rest of the page stay clean.


"element_create": [
  {
    "elements": [
      {
        "bbox": [
          "0",
          "688",
          "$page_width",
          "$page_height"
        ],
        "element_template": {
          "template": {
            "pagemap": [
              {
                "rd_sort": "2",
                "rd_sort_direction": "2",
                "statement": "$if"
              }

Detecting Continuous Multi-Page Tables with Anchors

In multipage bank statements, tables often span several pages – the structure varies: one statement might contain a 2-page table, while another could include a 40-page table. The JSON template system uses anchors to dynamically detect the start and end points of each table.

This means a single template can be applied across thousands of documents, accurately identifying differently sized tables in each file based on the rule system defined in the Templates.

The same approach works for invoices: one template tags tables that span one page in one invoice and several pages in another. See the Tech Solutions Invoice sample on GitHub, with tagged example invoices and the invoice JSON template (INV-2023.json).

The table is created with element_create as one continuous pde_table. Its start (start_bbox) sits under the table anchor and its end (end_bbox) above the footer anchor, so the table ends wherever the footer is, on any page.

]
                },
                "statement": "$if"
            },
            {
                "comment": "Tag continuous table",
                "elements": [
                    {
                        "end_bbox": [
                            "0",
                            "$ANCHOR-Footer_top",
                            "$page_width",
                            "$ANCHOR-Footer_top"
                        ],
                        "flag": "continuous",
                        "name": "INITELEM-Table",
                        "start_bbox": [
                            "0",
                            "$ANCHOR-Table_bottom",
                            "$page_width",
                            "$ANCHOR-Table_bottom"
                        ],
                        "type": "pde_table"
                    }
                ],

Anchors like ANCHOR-Table and ANCHOR-Footer are created using regex patterns in text_line_update.

Here the anchor is the line that starts with “Transaction Details”. Other rules then use its edges, such as $ANCHOR-Table_bottom, instead of fixed coordinates.

     ],
        "text_line_update": [
            {
                "comment": "Create ANCHOR-Table",
                "flag": "anchor",
                "name": "ANCHOR-Table",
                "query": {
                    "$and": [
                        {
                            "$0_text": {
                                "$regex": "^Transaction Details"
                            }
                        }
                    ],
                    "param": [
                        "pde_text_line"
                    ]
  • Tag thousands of PDFs automatically using one smart, reusable template
  • Ensure consistent tagging across invoices, bank statements, and reports
  • Improve semantic tagging accuracy for headings, tables, images, and more
  • Cut manual work: PDFix customers routinely automate 70–98% of processing across large backlogs
  • Get PDF/UA-ready output that you check with built-in veraPDF validation

Deutsche Bank built PDFix SDK Enterprise into its customer communication platform, so bank statements and loan agreements are tagged when they are generated. Each document type has one JSON layout template, and the bank processes millions of PDFs per month. Read the Deutsche Bank case study.

Once your JSON template is complete, apply it via:

  • PDFix SDK – perfect for batch jobs or server-side automation, for example pdfix_app add-tags -i in.pdf -o out.pdf -c template.json
  • PDFix Desktop – test the template and fine-tune it visually; tag many files at once with Desktop Enterprise

Try tagging your bank statement with a sample JSON today

No time to build the first template? Send us a sample document and our team will create a template for you to test.

Frequently Asked Questions

What is the best way to auto-tag bank statements and invoices?

Use a template. Bank statements and invoices repeat the same layout, so one PDFix layout template per document type can tag every new file the same way. You define what to tag and where once, then apply the template to thousands of files.

Can one template handle tables of different lengths?

Yes. Text anchors mark where a table starts and ends, and a continuous table rule follows the table across pages. The same template tags a 2-page table in one statement and a 40-page table in another.

How is a PDFix layout template created?

You can create a template with Preflight in PDFix Desktop, with an AI model, or by hand in the Template Editor. You can also send us a sample document and our team will create a template for you. Template examples are on GitHub.

Do I need to code to build a template?

No. PDFix Desktop has a visual Template Editor where you set the rules, test them on a sample PDF and save the template as JSON. Developers can also edit the JSON directly.

How do I apply a template to thousands of PDFs?

In PDFix Desktop Enterprise, add the template to the AutoTag action and run it on many files at once. With the PDFix SDK, run pdfix_app add-tags with the template, or call the SDK from Python, C++, .NET or Java in your own pipeline.

Is template-tagged output PDF/UA compliant?

Check every file with the built-in veraPDF validator. Automated validation covers the machine-checkable PDF/UA rules. A person still needs to check things like whether alt text is meaningful.

When is a template not the right choice?

When documents are one-off or their layout changes a lot. For scanned statements, run OCR first, then check whether the result is consistent enough for a template.

Can PDFix tag statements when they are generated?

Yes. The PDFix SDK can run inside your document generation system. Deutsche Bank uses it in its customer communication platform, so statements are tagged at creation instead of being fixed later.