CaseLeaf

Handbook / The `import` command

The import command

A reviewer without your software sends their comments back in whatever their tool produced, and they have to land on the document they are about.

Brings marks in from elsewhere. It is the receiving half of export: a review made somewhere else, or in another application, lands on the document it is about. Use it when a reviewer cannot use the same tools and sends back something rather than nothing.

How you run it

caseleaf import report.pdf --from path.json

What each part means

In full, every part it will take:

caseleaf import <file> --from <path.json>
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.
--from The marks to bring in, as a path to what export --to wrote, such as review.json. They are added to the marks already there; nothing is replaced.

Places the marks a --to export wrote, added to what is there.

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" : 5,
  "note" : "1 mark(s) had no recorded words found in this document and were placed at their original coordinates - check them if this is not the document they were exported from",
  "placedByPosition" : 1,
  "placedByWords" : 4,
  "placedHow" : {
    "exact" : 4
  },
  "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 "import" on "/path/to/report.pdf" ¬
        options "--from path.json"
end tell

All the commands · Asking from a script · Contents