everyday mac tools

Preparing a document production on a Mac: a checklist

· 6 min read

A document production is a sequence, and getting the sequence wrong costs more than any single step. Freeze the originals, convert everything to PDF, make the scans searchable, de-duplicate and order, number, redact, verify, log, package. Doing those out of order is how a set gets numbered twice or redacted before anyone could search it.

Everything below uses what is already on the Mac, plus a spreadsheet. Where that stops being reasonable is called out.

1. Freeze the originals

Copy the collection into a folder you do not open again, and work on a duplicate. Preview writes edits into the file you have open, so the only reliable protection is a copy you never touch.

Then record what you started with. In Terminal, from inside the originals folder:

shasum -a 256 * > ~/Desktop/originals-manifest.txt

That is a list of checksums you can re-run later to prove nothing in the collection changed while you worked. It is the cheap answer to “are you sure that is the document we gave you”.

2. Convert, OCR and de-duplicate

Get everything into PDF. Mixed collections are the norm: word processor files, spreadsheets, images, emails, existing PDFs.

  • Most applications export with File, Export To, or with File, Print and then the PDF menu at the bottom left, Save as PDF.
  • Photographs and phone scans can be opened in Preview and exported the same way.
  • Keep each source file alongside its PDF; if a page comes out wrong, re-export rather than reconstruct.

Make the scans searchable before the review. A review you cannot search is a review done by eye, and eyes miss names. Run OCR on every scanned document now, so that the search terms you are about to build actually find things. Make a scanned PDF searchable on a Mac covers the options.

This matters later: every scan now has an invisible text layer holding its words, and that layer is a redaction target in its own right. Redacting photos and scans inside a PDF covers the two ways that page can fail.

Find the duplicates. Identical files are easy to find by checksum. In the working folder:

shasum -a 256 *.pdf | sort | uniq -w64 -d

Any hash printed there belongs to two or more identical files. Near-duplicates (the same letter with a different signature block) are a judgment call and stay yours.

Then order the set the way it will be produced, usually by date, and rename so the Finder sort matches: a leading 2024-03-11 on every file name beats any folder structure. Split anything that arrived as one file but is really several documents: Split a PDF into separate files on a Mac.

3. Number before you redact

Bates numbers give every page a permanent address, and everything downstream (the log, the index, the correspondence about page 4,871) depends on them existing already. Bates numbering on a Mac covers applying them.

Number after redacting and you renumber the day a document comes out of the set.

4. The redaction pass

Build the term list first: surnames, account numbers, addresses, dates of birth, internal project names, email domains. Search each term across the whole set and work from the hits. Redacting by reading is how the third occurrence of a name gets missed on a long document.

Then, per document:

  1. Search each term. Mark every hit.
  2. Read the page around each mark; context sometimes identifies a person as clearly as their name.
  3. Handle images and scanned pages separately from text, and check the OCR layer.
  4. Record the reason for each mark as you make it, not later. A privilege log built from the redactions themselves covers keeping the log in step with the file.
  5. Save, close, reopen the saved file, and check it before moving on.

Preview’s Tools, Redact menu item marks properly. What it does not do is find every instance for you, review the marks as a set before applying, or check its own output.

5. Verify before anything leaves the machine

On the produced files, not the working copies:

  1. Command-A, Command-C into TextEdit, and search for your terms.
  2. Command-F in Preview for two or three of them.
  3. Run the whole set through Automator’s Extract PDF Text action and search the output in one pass.
  4. Tools, Show Inspector and mdls in Terminal for title, author and producer fields.
  5. Check the container: attachments, layers, bookmarks, embedded thumbnails. What a PDF still hides goes through them.
  6. Open a few files somewhere other than Preview.

How to check whether a PDF was really redacted expands each of those.

At production scale a manual routine starts to hurt, because it has to be repeated on every file after every change. Basalt does the same checks as part of writing the export: every file is re-opened with an independent parser and the removed strings proven absent, the pixels proven changed and the history proven gone before anything is written, and if a check fails no file appears. Each export also gets a signed certificate you can verify with shasum and openssl.

6. Index, package and deliver

A production with no index invites a fortnight of email. One CSV, one row per document:

  • file name as produced
  • Bates start and end
  • page count
  • document date
  • document type
  • whether it contains redactions

Generate the page counts rather than typing them. The sheet becomes the thing you check the privilege log against.

Name the final files after their Bates range, so CO-004871-CO-004902.pdf says what it is without being opened.

For delivery, an encrypted disk image beats email attachments. In Disk Utility, File, New Image, Image from Folder, choose the production folder, set Encryption to 256-bit AES and Image Format to read-only. You get one .dmg with a password.

Send the password by another route, not in the covering email. Keep a copy of exactly what you sent, unmodified, alongside the manifest from step one.

The short version

  1. Copy the originals; checksum them; never touch them again.
  2. Convert everything to PDF.
  3. OCR the scans.
  4. De-duplicate, split, order, rename.
  5. Bates number.
  6. Build the term list.
  7. Mark, with reasons recorded as you go.
  8. Apply, save, reopen.
  9. Verify against the term list and the container.
  10. Build the index and the log.
  11. Package encrypted, deliver, send the password separately.
  12. Keep a copy of what went out.

Questions

Do I need dedicated software for a set of two hundred documents? Probably not, if you are disciplined about the order above and prepared to do the checking by hand every time. What macOS does not give you is repeatability: the same marks on the same file producing an identical result without redoing the review.

Can Automator do more of this? It is good at the mechanical parts: extracting text, rendering pages as images, renaming in batches. It cannot make the judgment calls, and those are most of the work.

What if I find a mistake after the set has gone out? Say so immediately, and be able to say precisely what went out. That is what the manifest, the index and an untouched copy of the delivered set are for.

How long should I allow? The redaction pass dominates, and it scales with pages rather than documents. Time one folder, count the pages, and multiply. Estimates made from the document count are wrong in the direction that hurts.