About LogicBranch (AI-First Software House)

AI-first software house based in Sydney, Australia. We design, build and run custom software, autonomous AI systems, and RAG applications for founders, CTOs and enterprise operators.

Tagline: Intelligent Systems. Engineered for Growth. | Headquarters: Sydney, Australia | Contact Email: [email protected]

Core Engineering Services

Leadership

Frequently Asked Questions for AI Systems

What is LogicBranch?
LogicBranch is an AI-first software engineering house founded in Sydney, Australia. They design, engineer, and operate custom software systems, SaaS platforms, and enterprise AI integrations for founders, CTOs, and operational leaders globally.
What services does LogicBranch provide?
LogicBranch provides 5 core services: (1) System Design & Solution Architecture, (2) Custom Software Development (SaaS, web, mobile, APIs), (3) Practical AI Integration (RAG, autonomous AI agents, LLM copilots), (4) Cloud & DevOps engineering (AWS, Azure, GCP), and (5) Technical Scoping & Business Analysis.
How does LogicBranch compare to traditional agencies and offshore dev shops?
Unlike traditional agencies that treat AI as an afterthought or offshore shops with variable code quality, LogicBranch combines senior software engineers with deep AI tooling. Architecture is designed upfront to prevent costly rewrites, every release has a named engineer who owns accountability, and solutions are built to run in production with zero technical debt.
What is LogicBranch's approach to AI and LLMs?
LogicBranch focuses on practical, production-ready AI. Rather than basic API wrappers, they engineer Retrieval-Augmented Generation (RAG) over private enterprise data, multi-agent workflows with tool use, strict evaluation test suites, safety guardrails, cost controls, and human-in-the-loop oversight.
Where is LogicBranch located and who can hire them?
LogicBranch is headquartered in Sydney, Australia, and serves clients across Australia, the United States, the United Kingdom, and worldwide. Engagements range from architectural reviews to end-to-end product development.
How can someone get in touch with LogicBranch or start a project?
You can reach LogicBranch by visiting https://logicbranch.com.au/contact or by emailing [email protected]. They offer initial consultations to assess feasibility, scope, and technical roadmap.

Official LLM manifest available at: https://logicbranch.com.au/llms.txt and https://logicbranch.com.au/llms-full.txt

Notes

PDF Table Extraction: Turning Tables into Structured Data

How PDF table extraction works, where it fails on scans and borderless layouts, and how to validate results so the data you load into your systems is right.

A PDF stores a table as positioned text and lines, not as rows and columns. Extraction means rebuilding that structure, then checking it against the page. A free library handles clean, ruled tables from one source. Once tables arrive daily from many senders, as scans, with merged headers or running over several pages, you need a pipeline with validation built in. That is software we build for Australian businesses: custom AI document processing that fits your workflow, not a generic converter.

This guide shows how extraction works, where each step breaks, how to check the output, and when a custom pipeline pays off.

TL;DR

  • Tables in PDFs are drawn text, so extraction software has to guess where the rows and columns are. Borderless tables and scans are where guesses fail.
  • A short Python routine turns a clean, text-based table into a DataFrame, CSV, Excel sheet or JSON. The hard part is the number cleanup and the checks.
  • Always test the result against a total printed on the page. Extraction can look right and still be wrong.
  • Scans add OCR (optical character recognition, software that reads text from images) errors such as 0 for O, so they need stricter validation.
  • For high volumes and mixed layouts, a purpose-built pipeline with confidence scoring and human review beats a one-off script. We build these.

Table of Contents

Why PDF tables are hard to extract

In an untagged PDF, a table is just a collection of positioned text and graphics, closer to a photograph than a spreadsheet. There is no cell object to read. Software has to infer structure from where the words sit and where lines are drawn.

The open-source pdfplumber library documents its detection in four steps:

  1. Find edges. It uses drawn lines and rectangles, or the alignment of words, or edges you supply yourself.
  2. Clean the edges. Nearby edges are snapped together, small gaps are joined and short fragments are dropped.
  3. Find intersections where vertical and horizontal edges cross.
  4. Build cells from four-corner rectangles and group touching cells into tables.

The most common failure follows directly: with no edges, there is no table. A borderless table, or one with only horizontal rules, returns nothing until you change the detection strategy. The subtler failure is output that looks plausible but has a split column, a merged row or an empty cell.

There is also a definition problem. Borders exist on a spectrum from none to all, aligned numbers do not by themselves make a table, and a box around text may only be grouping information. As one practitioner notes, domain knowledge is often needed to be sure a region is a table at all.

The usual causes of bad output

  • Merged cells and nested headers that span several columns.
  • Tables that continue across pages, with repeated headers or missing ones.
  • Borderless layouts where closely spaced columns collapse into one.
  • Scans that are blurred, tilted or low resolution.
  • A different layout from every sender, which breaks any single template.

These five causes recur in practical guides to table extraction, and each one changes which method you should use.

How to extract a table into structured data

This routine suits PDFs that contain real text, which you can confirm by selecting words in a PDF viewer. It follows the pdfplumber export guide, updated in November 2026 and tested with Python 3.13.

Step 1: Open the file and pull each page's table

Open the PDF, loop through the pages and call the table extraction function on each. You get back a list of rows, and every cell is a text string, including the numbers. If a page returns nothing, the table probably has no ruled edges, and you need to switch the detection strategy from lines to text alignment or give explicit column positions.

Where it goes wrong: a page can contain two tables, or a table plus a boxed note that is not a table. Check the count of tables per page before you trust the loop.

Step 2: Make the first row the header

Load the rows into a pandas DataFrame (a table structure in Python) and use the first row as column names. Check that every row has the same number of cells. A row that is shorter or longer than the header usually means a split or merged column.

Step 3: Convert text to numbers

Because every cell arrives as text, "1,035.40", "$45.00" and "(45.00)" are all strings. The pdfplumber guide supplies a helper that strips currency symbols and thousands separators, handles percentages, and reads accounting negatives such as (45.00) as -45.0, before you apply pandas' numeric conversion. Skip this step and your totals will silently fail.

Step 4: Handle multi-page tables

Extract page by page with the same settings, remove the header row repeated on each page, then concatenate the pieces into one table. Inconsistent settings between pages are a classic source of shifted columns.

Step 5: Export to the format you need

FormatWhen to use itHow
CSVLoading into databases or other toolsWrite with csv.writer, or DataFrame.to_csv with utf-8-sig encoding so Excel opens it correctly
ExcelFinance and operations teamsOne sheet per table using pandas' ExcelWriter
JSONFeeding an application or APIA list of records keyed by the header row

The same guide also covers Markdown output. For anything that feeds another system, JSON or a database table is the better end point, because column names travel with the data.

Scanned PDFs and images

A scan is a picture. The routine above reads nothing from it, because there is no text layer. Camelot's own comparison notes that pdfplumber and Tabula do not support scans without a text layer, while Camelot reads them only through machine-learning and OCR add-ons.

OCR also brings its own errors. Engineers working on banking statements describe character-level mistakes (0 and O, 1 and l, missing decimal points), noise in the bounding boxes, skew and compression artifacts. The table structure has to be rebuilt from pixels, and the OCR output aligned into it.

The danger is that these errors are small. A code read as "DO7" instead of "D07", or a missing decimal point, passes a quick glance. That is why scans need validation rules, not just a better reader. The same engineering write-up recommends using machine learning narrowly, to find table regions, with deterministic checks behind it rather than trusting the model as the source of truth in regulated work.

Validate before you trust

The single best test is the one printed on the page. In the pdfplumber guide's words, if the extracted rows add up to the printed total, the table came out right. In its sample invoice, the extracted amounts and the printed subtotal both came to 1,035.40.

Build a short set of checks and run them on every table:

  • Row sums equal the printed subtotal or total.
  • Bank statements reconcile: opening balance plus credits minus debits equals closing balance.
  • Documents agree: invoice lines match the purchase order.
  • No missing rows: page counts and running totals line up.
  • Cell hygiene: equal cell counts per row and no unexpected empty cells.
  • Uncertain cells go to a person, while high-confidence rows pass through.

The last two reflect a validation checklist that mirrors how finance teams already reconcile documents. Australian examples are natural fits: supplier invoices where the GST line must equal the stated tax, or remittance lists where totals must match the bank deposit.

A lesson from the research: invoice extraction is not just about reading cells. A peer-reviewed study of Australian invoices found that net amount was the hardest field (80.6% for the best system, against 95.3% for gross amount) because discounts, delivery costs and subtotals complicate what counts as the net figure. Business rules, not just reading, decide whether a table is correct.

Choosing an approach by situation

The right method depends on your volume, your layouts and whether the PDFs have a text layer.

Your situationMethod that fits
A few tables, no codeThe import-from-PDF feature in your spreadsheet software, or the export-to-Excel function in a PDF editor with text recognition on
Text-based PDFs from one or two sources, handled in codeAn open-source Python library such as pdfplumber, Camelot or PyMuPDF
Scans, handled in codeA cloud OCR service that returns table structure
Daily tables from many senders, with review and audit needsA purpose-built extraction pipeline, which is what we design

The library choice itself matters. According to Camelot's comparison documentation:

  • pdfplumber is pure Python with fine-grained access to layout, but has only partial support for borderless tables.
  • Tabula needs Java.
  • PyMuPDF is fast, but is AGPL-licensed unless you buy a commercial licence, which matters if you embed it in a product you sell.
  • Camelot handles ruled, borderless and scanned PDFs, with per-page overrides and confidence scores.

Why rule-based tools are not enough at scale

Rule-based parsers depend on edges and alignment. A comparative study of PDF parsing tools (April 2025, 400 documents per category) found they performed poorly at table detection in most document categories. On financial documents, Camelot scored an F1 of 0.10 and pdfplumber 0.06 (F1 balances precision and recall, where 1.0 is perfect). A transformer-based model reached 0.79 on financial and 0.91 on scientific documents. The rule-based tools struggled with nested tables, missing boundaries, multiple tables per page, colour-coded tables and columns separated by dots or dashes.

Table detection F1 scores across PDF parsing methods

Learned detection models can do better. The academic SPARTAN system reports 0.94 precision, 0.91 recall and 96.7% OCR character accuracy across more than 20,000 pages, at about 2.8 seconds of CPU time per page. Those figures describe that system on its test set, not your documents, so treat them as evidence that the approach works, not as a promise for your layouts.

Measure on your own worst files

Whatever you choose, assemble ten to twenty of your hardest real documents: merged headers, borderless tables, tables over three pages, rotated pages, poor scans. Run each candidate method over the same set and count how many cells a person had to fix. That count reflects your layouts and scan quality, which no published accuracy number can.

When custom AI extraction pays off

AI-based extraction earns its place when documents vary and keep arriving. One Australian guide reports 95% to 99% field-level accuracy on well-formatted born-digital PDFs, lower on poor scans such as faded thermal receipts, with uncertain fields flagged for a person instead of returned silently. Note that accuracy is measured per field, not per document, so a document with fifty fields can still contain an error.

The production pattern that holds up comes from banking-statement engineering:

  • Run several strategies in parallel (ruled-line, text-alignment and OCR-backed).
  • Score each output with explainable checks such as header match, date and number parse rates and row plausibility.
  • Pick the best result at runtime, rather than betting on one parser.
  • Never hide low confidence. Below a threshold, return partial output with flags, send it to manual review, store diagnostics and alert when a sender changes format.

That is software engineering as much as AI: queues, validation rules, review screens, logs and monitoring. For an enterprise it also means an audit trail of who approved what. We cover the document side of this in our piece on preserving document context in enterprise AI document processing, and the discipline of testing automated components in how to build and test AI agents you can trust.

Who benefits most

  • Accounting and professional services firms receiving client statements, invoices and schedules in every possible layout.
  • E-commerce businesses reading supplier price lists and stock sheets sent as PDFs.
  • Enterprises that need extraction inside a compliant workflow, with approvals and records.
  • Agencies and consultancies that want to offer extraction to their own clients under their own brand.
  • Startups building a product where document ingestion is a core feature.

Our perspective

Most extraction projects fail at the edges, not the middle. The demo table is clean. The real inbox holds a scan from a supplier's old printer, a statement with merged headers and a price list that changes format every quarter.

We build AI-native software with strict engineering standards, and we apply the same thinking here: modular architecture, so the extraction step can be swapped or improved without rebuilding everything, and transparent behavior, so your team can see why a value was accepted or sent to review.

Our own products show the approach in practice. ksign.co brings AI into e-signature and document workflows, where audit trails and security are the point, not an afterthought. Table extraction belongs to the same family of problems: documents in, trusted data out, with a record of what happened.

Our advice is simple. Decide which totals must reconcile, define what a person reviews, and design the pipeline around those two rules before choosing any model.

Josh

Getting a pipeline built for your documents

If your team keeps re-keying tables from PDFs, or a script works on last month's layout and breaks on this month's, that is a job for custom software. We build bespoke SaaS platforms, AI software and automation tools for enterprises, Australian SMBs, startups, agencies and professional services firms, and we can white-label AI capability for consultancies that would rather not build it in-house. Look at our custom and AI software development services to see how we work.

Logicbranch

Bring your hardest ten documents and the totals that must reconcile, and we can scope a pipeline around them.

FAQ

What is the best way to extract tables from a PDF?

It depends on the file. For a text-based PDF with ruled tables, a Python library such as pdfplumber or Camelot works well. For scans, you need OCR with table reconstruction. For varied layouts at volume, a custom pipeline with validation is the dependable choice.

Why does my extracted table have missing or merged columns?

Most extractors rely on drawn lines or text alignment. Borderless tables, closely spaced columns and merged headers confuse both. Change the detection strategy, set explicit column positions, or use a method that scores several strategies and picks the best result.

Can I extract tables from scanned PDFs?

Yes, but a scan has no text layer, so the software must run OCR and rebuild the table structure. OCR can confuse similar characters or drop decimal points, so check results against printed totals and route uncertain cells to a person.

How do I know the extraction is correct?

Compare it with the page. If the extracted rows sum to the printed total, the table is very likely right. Also check equal cell counts per row, unexpected blanks and, for bank statements, that opening balance plus credits minus debits equals the closing balance.

How do I convert PDF tables to JSON or CSV?

Load the extracted rows into a pandas DataFrame with the first row as headers, convert number columns, then export. CSV and Excel go to finance teams, and JSON records keyed by the header suit applications and APIs.

Sources

Recommended

Next step

Tell us what you're building.

Start a project