CaseLeaf

Handbook / The `export` command

The export command

The client's own system needs the review comments, and it does not take PDFs.

Writes the marks out as an archive somebody else can read. It is how a review leaves the document: the recipient gets the comments without the file, or gets them in a form their own tools can take. Use it to hand a review to a system rather than to a person.

How you run it

caseleaf export report.pdf

caseleaf export report.pdf --to marks.json

What each part means

In full, every part it will take:

caseleaf export <file> [--to <archive>]
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 archive of marks, as a path ending .json, such as marks.json. Left out, it is printed to the screen, which is what a script reading it wants.

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.

{
  "format" : "caseleaf-marks",
  "marks" : [
    {
      "bounds" : [
        72,
        690,
        358,
        26
      ],
  … 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 "export" on "/path/to/report.pdf"
end tell

tell application "CaseLeaf"
    perform "export" on "/path/to/report.pdf" ¬
        options "--to marks.json"
end tell

All the commands · Asking from a script · Contents