CaseLeaf

Handbook / The `redactions` command

The redactions command

A document arrives already redacted and somebody has to sign to say the redactions are real rather than black rectangles laid over readable text.

Reports what has been blacked out and by whom. A redaction is a claim that something was removed, by someone, at some point, and this is how the claim is checked. Reach for it when a document arrives already redacted and somebody has to attest that the redactions are real rather than a black rectangle laid over readable text.

How you run it

caseleaf redactions report.pdf

caseleaf redactions report.pdf --printed --to reviewed.pdf

What each part means

In full, every part it will take:

caseleaf redactions <file> [--printed] [--to <file>]
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.
--printed Match each row against the page number printed on the sheet rather than its position in the file. Worth it for a bundle whose printed numbering does not start at the first sheet.
--to Where to write the result, as a path. The shape above shows which format this command writes. Left out, the answer is printed instead of written, which is what a script reading it wants. Either way the document you named is left 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.

{
  "blackouts" : 1,
  "columns" : [
    "Sheet",
    "Printed page",
    "Left",
    "Bottom",
    "Width",
    "Height",
    "Basis",
    "Marked by",
    "Marked at"
  ],
  … and the rest of the answer

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 "redactions" on "/path/to/report.pdf"
end tell

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

All the commands · Asking from a script · Contents