Home Guides

Affinity

How to export separate PDFs from an Affinity Data Merge and name them from your CSV

You merged 100 certificates or 300 labels in Affinity. Now every page has to be its own PDF, named after the person or the product. Here are the four ways to do it, with a real example and the mistakes that put the wrong name on the wrong file.

Disclosure. Wellkept makes one of the tools described below, the GetWellkept Named PDF Export script. The free routes come first, and we say where each route is the better choice.

The short answer

Affinity Data Merge generates one document with one record per page. Affinity does not have a setting that saves each page as its own PDF named from a data field. You have four options:

  1. Export page by page in Affinity and type each file name. Fine for a handful of pages.
  2. Export one PDF, then split and rename it in a second program. Free tools split every page; naming from the page content or a list needs care.
  3. Build the job on named artboards instead of pages and export the artboards. Works when you plan it before the merge.
  4. Run a script inside Affinity that exports each page with the name from the CSV. Affinity 3 can run scripts; you can write one or use a ready-made one.

Whichever route you take, the rule is the same: record 1 of the CSV is page 1, record 2 is page 2. If that link breaks, the right certificate gets the wrong name.

What you need before you start

Why Affinity does not name the files for you

Data Merge is built to generate a document, not to save files. On the official Affinity forum the answer to this question has been the same for years: Data Merge generates a single file, and you split it afterwards. The PDF export then writes the pages or page range you choose; it has no field for “use this CSV column as the file name”.

The same question keeps coming back with the current Affinity 3: in March 2026 someone with 100 training certificates asked how to get one PDF per person named from the CSV, and in September 2026 someone with 300 product labels asked the same. Both ended up with an export, a splitter and a renamer.

A real example: 3 certificates, 3 named PDFs

This is the sample we use for testing. The CSV has three records:

Recordidnamecourse
1001Anna MeyerExcel Basics
2002Max KellerExcel Basics
3003Sara AhmedData, Charts and Reports

Data Merge turns it into a 3-page document. What we want at the end is three files, each named from the name column, with spaces turned into underscores:

PageCSV valueFile
1Anna MeyerAnna_Meyer.pdf
2Max KellerMax_Keller.pdf
3Sara AhmedSara_Ahmed.pdf
Output folder of a real run: Anna_Meyer.pdf, Max_Keller.pdf, Sara_Ahmed.pdf, _report.csv and _summary.txt; the report lists record, page, file and status ok for all three; exported 3 of 3
The result of a real run with our script on this sample: one PDF per record, plus a report.

Note the third record: the course contains a comma, so the CSV puts it in quotes ("Data, Charts and Reports"). Any tool you use has to read that as one value, not two.

For labels the name column is usually a product number. A CSV with 00125, 00126 and 00127 should give 00125.pdf, 00126.pdf and 00127.pdf, not 125.pdf. That matters as soon as a spreadsheet program is involved, see the errors below.

Route 1: export page by page

  1. Open the merged document and choose File › Export, then PDF and your preset.
  2. Set the area to a single page, for example page 1.
  3. Save, and type the file name from record 1 of your CSV.
  4. Repeat for page 2, page 3 and so on. Open a few files to check that each name matches the page.

Good for: up to about ten pages, or a one-off job. Watch out for: typing errors and skipped pages; the work grows with every page and nothing checks it for you.

Route 2: one PDF, then split and rename

Export the whole merged document as one PDF, then split it into single pages in another program and give the pages their names.

Good for: people who already own a PDF tool, or jobs where the name is printed in the same place on every page. Watch out for: a second program and a second step for every batch, and the order check is up to you.

Route 3: artboards and slices

If you design on artboards instead of pages, each artboard can have a name, and Affinity exports artboards as separate files with those names. Free community scripts such as Artboard Exporter and Export every artboard do this in one go.

The catch: Data Merge generates pages, and the artboard names do not come from the CSV. You either name 100 artboards by hand or plan the whole job around artboards before you merge. Some users also report that Slice Studio only showed one slice for a generated multi-page document, in the September 2026 label thread.

Good for: small, planned jobs that you design as artboards from the start.

Route 4: a script inside Affinity

Affinity 3 can run JavaScript scripts (scripting arrived with version 3.2 and is still marked beta). A script can export one page at a time with a file name of its choice, so it can read the CSV and do the naming inside Affinity, with your own PDF preset. If you write code, the Affinity SDK documents the export area for single pages.

A free certificate exporter preview by Kakulu was described in October 2026 (macOS only, names read from labelled text frames rather than a CSV). As of 28 November 2026 its pages no longer load (HTTP 410), so we cannot point you to it.

Our own script is the one we built for exactly this job:

The script's check-before-export dialog in Affinity: record 1 Anna Meyer to page 1 Anna_Meyer.pdf, record 2 Max Keller to page 2 Max_Keller.pdf, record 3 Sara Ahmed to page 3 Sara_Ahmed.pdf, 0 problems
The real preview in Affinity 3.3.3 on Windows: every record, its page and its final file name, before anything is written. The folder path is blurred.
The script's settings dialog in Affinity: CSV file, name column, prefix, suffix, spaces to underscore, what to do with repeated names, PDF export preset and output location
The settings dialog: name column, optional prefix and suffix, repeated names, PDF preset and where the new folder goes.

GetWellkept Named PDF Export for Affinity

An Affinity script (.afscript) for the last step after Data Merge: choose the CSV you merged with, pick the name column, add a prefix or suffix if you like, choose one of your PDF presets, check the preview, and Affinity exports one PDF per page into a new folder, with a report. It never overwrites files, stops on empty or repeated names (or adds _2, _3 if you choose), keeps leading zeros and reads comma, semicolon or tab CSVs in UTF-8 or Windows-1252.

Tested in real runs with Affinity 3.3.3 on Windows 10 (64-bit): 1 to 300 records, facing pages and section numbering. 300 named PDFs took 21.8 seconds of export time. macOS and iPad are not tested yet, so they are not listed as supported. Digital download, $29 one time, English and German interface, email support.

Also on Payhip · $29. Independent product, not affiliated with Affinity or Canva.

The four routes compared

RouteNames from the CSVStays in AffinityChecks the orderCost
Page by pageTyped by handYesOnly by youFree
Split, then renameFrom a list or from page textNo, second programOnly by youFree to paid
ArtboardsNo, artboard namesYesOnly by youFree
Script (ours)Yes, any columnYesCounts must match, full preview$29

No route can prove that page 7 really shows record 7 without reading the page. The script makes the check easy (it refuses to run when the counts differ and shows every record next to its page and file name), but the final look at the first and last pages is yours.

Errors that put the wrong name on a file

Questions people ask

Can Affinity Data Merge save each record as a separate PDF?

Not on its own. Data Merge generates one document with one record per page. To get separate files you export page by page, split a combined PDF in another program, use named artboards, or run a script inside Affinity that exports each page.

Can the file name come from a field in my CSV?

Not with the built-in export. A script can read the CSV and use any column as the file name, for example name, sku or id. Splitting tools can name files from text on the page or from a list of names in the same order.

Does this work with Affinity Publisher 2?

The page-by-page and split-and-rename routes work with any version. Scripts need the current Affinity 3, which added scripting in version 3.2. Our script was tested with Affinity 3.3.3 on Windows 10 only.

How do I stop two people with the same name from overwriting each other?

Use a unique ID in the file name, for example 001_Anna_Meyer.pdf, or number repeats as _2, _3. Check for repeats after the names are cleaned, because Anna Meyer and anna meyer can turn into the same file name.

Does the script do the Data Merge for me?

No. You generate the merged document in Affinity first. The script exports and names the pages of that document.

Does the script work on a Mac?

It has not been tested on macOS or iPad yet, so we do not list them as supported. It was tested with Affinity 3.3.3 on Windows 10 (64-bit).