CaseLeaf

Handbook / The `bookmark` command

The bookmark command

You are working through a long document over several days and keep losing the sheet you stopped at.

Keeps a sheet so you can come back to it. It is the reader's own marker rather than a mark on the page: nothing is drawn, nothing changes for anybody else opening the file. Use it while working through something long, and read them back with read.

How you run it

caseleaf bookmark report.pdf --page 1

caseleaf bookmark report.pdf --page 1 --label "force majeure"

What each part means

In full, every part it will take:

caseleaf bookmark <file> --page <n> [--label <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.
--label What the bookmark is called in the list, for example --label "Schedule B". Left out, the sheet names itself: Page 3 for the third.

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.

{
  "bookmarks" : 1,
  "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 "bookmark" on "/path/to/report.pdf" ¬
        options "--page 1"
end tell

tell application "CaseLeaf"
    perform "bookmark" on "/path/to/report.pdf" ¬
        options "--page 1 --label \"force majeure\""
end tell

All the commands · Asking from a script · Contents