CaseLeaf

Handbook / The `comment` command

The comment command

You disagree with one highlighted sentence and want your reason attached to it rather than in an email thread.

Comments on one mark. A mark says this is the bit; a comment says what you think about it, attached to that mark rather than floating on the page. This is the single-mark form. reply answers somebody else's, and talk puts one up for discussion.

How you run it

caseleaf comment report.pdf --page 1 --index 2 --text "force majeure"

What each part means

In full, every part it will take:

caseleaf comment <file> --page <n> --index <n> --text <text>
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. This command writes to it, so keep a copy if the original matters.
--page Which sheet, counting from 1, so --page 4 is the fourth sheet as it sits in the file, whatever number is printed on it. This command needs it, together with --index: the two name one mark between them.
--index Which mark on that page, counting from 0.
--text What the comment says, in quotation marks, for example --text "Check this against schedule B". It is attached to that one mark, not to the sheet.

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.

{
  "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 "comment" on "/path/to/report.pdf" ¬
        options "--page 1 --index 2 --text \"force majeure\""
end tell

All the commands · Asking from a script · Contents