CaseLeaf

Handbook / The `attachments` command

The attachments command

A bundle is about to go to the other side, and you need to know what is travelling inside it that nobody put there on purpose.

Lists the files carried inside the document. A PDF can hold other documents within it, and they are easy to forget: they travel with the file, they are not visible on any page, and they can carry more than the sender intended. Use it before sending a document on, and to find the spreadsheet somebody attached to a submission rather than sending it separately.

How you run it

caseleaf attachments report.pdf

What each part means

In full, every part it will take:

caseleaf attachments <file>

The document, and nothing else.

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.

{
  "attachments" : [

  ]
}

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 "attachments" on "/path/to/report.pdf"
end tell

All the commands · Asking from a script · Contents