CaseLeaf

Handbook / The `sign` command

The sign command

Sixty copies of the same release need the same signature on the same line, without opening each one by hand.

Puts a stored signature on a page, or fills a signature field with it. It is the same signature the window's own pull-down offers, placed by a script instead of by dragging - for the batch of copies that all need the same signature on the same line. Placed on a page it arrives as a mark, movable until the document is made permanent; in a field it is the field's fill, the same as pressing one.

How you run it

caseleaf sign report.pdf --signature Reviewer --page 1 --bounds 72,540,180,24

caseleaf sign report.pdf --signature Reviewer --field Reviewer

What each part means

In full, every part it will take:

caseleaf sign <file> --signature <name> --page <n> --bounds x,y,w,h
caseleaf sign <file> --signature <name> --field <name>
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.
--signature Which stored signature to place, by the name it was given when it was captured or imported, such as --signature Reviewer. Show the Signatures Folder lists what is stored under.
--page Which sheet to put it on, counting from 1, when placing it by position rather than into a field. Needed together with --bounds, and not needed at all when --field names a signature field instead.
--bounds The rectangle, as four numbers: distance from the left, distance from the bottom, width, height, all in points, 72 to the inch. 72,540,180,24 is a box an inch in from the left, near the top of an A4 sheet. Commas, semicolons or spaces all separate them, and since a semicolon ends a command in most shells, that spelling wants quoting: --bounds "72;540;180;24".
--field A signature field to fill, by its own name, instead of --page and --bounds. Use fields to see what a document's signature fields are called.

Placed on a page, a signature arrives as a mark — movable, and drawn into the page for good only once the document is saved, the same as the window's own Signature menu. In a field, it is the field's fill, the same as pressing one. Part of the pro option.

What the document needs first

sign answers nothing until the document has a signature already stored on this machine, under a name to give --signature - saved from the window's own Signature setup, never something this page can carry without naming somebody real. Asked of a document that does not, it says so and changes nothing.

No hand-built sample can carry that.

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 "sign" on "/path/to/report.pdf" ¬
        options "--signature Reviewer --page 1 --bounds 72,540,180,24"
end tell

tell application "CaseLeaf"
    perform "sign" on "/path/to/report.pdf" ¬
        options "--signature Reviewer --field Reviewer"
end tell

All the commands · Asking from a script · Contents