CaseLeaf

Handbook / The `flatten` command

The flatten command

The final signed copy must look identical to everyone, and nobody should be able to move or delete a comment on it.

Burns every mark into the sheet. After it, the marks are part of the picture: nobody can move them, edit them, reply to them, or read them back out. That is the point. It is for the final copy, the one that must look the same to everybody and cannot be unpicked. It cannot be undone on that copy.

How you run it

caseleaf flatten report.pdf --to reviewed.pdf

What each part means

In full, every part it will take:

caseleaf flatten <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.

The result is written as a new file; the original is left untouched.

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.

{
  "marks" : 4,
  "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 "flatten" on "/path/to/report.pdf" ¬
        options "--to reviewed.pdf"
end tell

All the commands · Asking from a script · Contents