Docling OCRIndependent Docling guide

Batch conversion

Bulk PDF to Excel: The Process Problem, Not the File Problem

Converting one PDF is a click. Converting two hundred is a data pipeline: layouts differ, filenames lie, half the files are scans, and the merged spreadsheet has no way to tell you which rows came from which document.

Inspect a PDF or the recorded sample

The browser viewer reads selectable PDF text. The NASA example also includes recorded Docling files.

Open the PDF viewer

What breaks in a batch

Mixed layouts, one set of columns

Statements from three banks or invoices from ten vendors will not share column names. Appending blindly produces a sheet with half the data in the wrong column.

No provenance

Two weeks later nobody can say which PDF a suspicious row came from. Always carry the source filename.

One bad file stops the run

A corrupt or password-protected PDF derails a batch job if it is not isolated and reported separately.

Scanned files hide in the batch

They convert without error and produce empty or garbled rows that pass a row-count check.

Ordering by filename

Sorted as strings, "statement-10" comes before "statement-2". Periods end up out of order.

Duplicate files

The same statement downloaded twice doubles every transaction in the merged sheet.

A batch process that stays auditable

1

Group by document class

One run per bank or vendor, not one run for everything. Consistent layouts convert consistently.

2

Convert and keep per-file outputs

Store each result as its own file (or sheet) before merging. The merged sheet is a convenience; the per-file output is the record.

3

Validate before merging

Check row counts, opening and closing balances where available, and a sample of values against the source. Catch failures per file.

4

Merge with provenance

Add source filename and period columns when appending. Deduplicate on (filename, date, amount).

Sizing the job honestly

Volume changes the economics. If you convert a hundred statements a month, the cost of a wrong number is much higher than the cost of the conversion — so verification per file matters more than raw speed.

With open-source Docling, batch processing is completely local and free. You can script conversions across hundreds of files using the Python SDK or command-line interface without worrying about subscription tiers or volume charges.

When not to batch

Highly variable documents — handwritten forms, receipts, unusual supplier layouts — should be converted in small groups with a human check, because errors there are systematic rather than random.

For bank statements, batch by month and reconcile each account separately. Mixing accounts in one sheet produces balances that look wrong even when every row is right.

Frequently asked questions

Can I process multiple PDFs at once?+

Yes! With the Docling CLI, you can process entire directories in one pass: `docling ./documents/*.pdf --to md,tsv`. Each result is saved cleanly to disk.

How do I keep track of which PDF each row came from?+

Add a source filename column when you merge. It costs one field and saves hours during an audit.

What about password-protected files in a batch?+

They must be unlocked first. Save unencrypted copies into the batch folder so the run does not stop on them.

Is batch conversion expensive?+

Docling is open-source under the MIT license, so converting 1 file or 10,000 files is 100% free. You run it on your own CPU or GPU infrastructure.

Can I automate it with an API?+

Yes! The official docling-serve Docker image provides a local REST API that you can self-host and call directly from your automated data pipelines.

Keep reading