CaseLeaf

Handbook / The `redact` command

The redact command

The whole document is going out publicly and everything marked has to be gone, not covered.

Removes what every mark like that flags, across the whole document: not a black rectangle painted over words, the words themselves come out, along with vectors and the covered part of any picture. Use identifiers first to find what has to go, blackout to mark each place, then this. It cannot be undone, and the copy it writes is the one to send.

How you run it

caseleaf redact report.pdf --to reviewed.pdf

What each part means

In full, every part it will take:

caseleaf redact <file> --to <output>
part what it is for
<file> The PDF to work on, as a path, such as report.pdf beside you, or the full path to it. It is read and not written.
--to Where to write the result, as a path. The shape above shows which format this command writes. This command needs it, and writes only there: the document you named is left exactly as it was.

Part of the legal option.

What comes back

Asked of a short sample document, it answers as below. The sample has eight sheets, a highlight and a note left by a reviewer, a web link, a small table, two pictures and one form field already filled in.

{
  "pages" : 1,
  "to" : "reviewed.pdf",
  "written" : true
}

The same thing from AppleScript

Everything above can be asked for from a script instead. There is one AppleScript command, perform: on names the document, and options takes the rest exactly as you would type it.

tell application "CaseLeaf"
    perform "redact" on "/path/to/report.pdf" ¬
        options "--to reviewed.pdf"
end tell

All the commands · Asking from a script · Contents