CaseLeaf

Handbook / The `transfer` command

The transfer command

A whole review was done on the draft, and the final version arrived yesterday.

Brings marks across from another document onto this one. It is for the review that was made on the wrong copy, a draft, a scan, a version that has since been superseded, where the comments are right and the document under them is not. Rare, and unpleasant to do by hand.

Note which document is which: you name the one the marks are to land on, and --from names the one they come off. Nothing is moved: the marks are copied, and the document they came from is opened for reading and left as it was.

How you run it

caseleaf transfer report.pdf --from document.pdf

caseleaf transfer report.pdf --from document.pdf --to output.pdf

What each part means

In full, every part it will take:

caseleaf transfer <file> --from <document.pdf> [--to <output.pdf>]
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 unless you send the result somewhere else with --to.
--from The document the marks are coming from, as a path. For example, caseleaf transfer final.pdf --from draft.pdf moves the review off the draft and onto the final. The document named here keeps its marks; they are copied, not cut.
--to Where to write the result, as a path. The shape above shows which format this command writes. Left out, the document you named is rewritten where it stands, because --to chooses where, not whether. Give one to keep the original.

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.

{
  "followedTheText" : 2,
  "keptTheirPage" : 2,
  "lost" : 0,
  "marks" : [
    {
      "bounds" : {
        "h" : 14,
        "w" : 208.51599999999999,
        "x" : 203.51599999999999,
        "y" : 696.7802734375
      },
  … 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 "transfer" on "/path/to/report.pdf" ¬
        options "--from document.pdf"
end tell

tell application "CaseLeaf"
    perform "transfer" on "/path/to/report.pdf" ¬
        options "--from document.pdf --to output.pdf"
end tell

All the commands · Asking from a script · Contents