CaseLeaf

Handbook / The `boxes` command

The boxes command

The form you are turning into something fillable has a blank the automatic reading keeps missing, and you want a second opinion on where the boxes on that sheet actually are.

Finds the rectangles drawn on each sheet: the ruled boxes somebody is meant to write in. It answers in the same shape fields does, and that is the point: fields is this application's own reading of where the blanks are, and this is the system's, so the two can be set against each other on a form where the first one is wrong.

Reach for it when fields has put a box somewhere there plainly is not one, or missed one there plainly is. It reports and writes nothing. It is a second opinion rather than the answer, and makeform writes fields from what fields found, not from this.

How you run it

caseleaf boxes report.pdf

What each part means

In full, every part it will take:

caseleaf boxes <file>

The document, and nothing else.

A second opinion on where the blanks are, beside the one fields gives: the same answer shape, from the system's vision rather than from this application's own reading of the pixels.

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.

{
  "count" : 19,
  "fields" : [
    {
      "height" : 73.97248911857605,
      "label" : "",
      "name" : "box",
      "page" : 0,
      "width" : 122.91941672563553,
      "x" : 397.71884709596634,
      "y" : 537.34958219528198
    },
  … 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 "boxes" on "/path/to/report.pdf"
end tell

All the commands · Asking from a script · Contents