A little card. A lot of reassurance. Help from The Card Project UK.
The Card Project UK
PersoFiles · Script reference

PersoFiles scripting

Make repeatable changes to a loaded PersoFile using short, readable commands. Open Edit, then Scripts on the right. Start with list fields and list layers to discover the field keys and artwork IDs in your design.

Your first script

holderName=Frank;
select field:holderName;
move 2 0;
set fill "#234f70";

Replace holderName with a field key from your own file. The assignment changes its raw default/sample value across every placement, including linked QR and barcode objects. It does not change data belonging to an existing customer order.

Run, review, save

Click Run script, or press Ctrl/Cmd+Enter in the script box. A successful run is one Undo step. Review the canvas, then Save when you want to keep the result. A script never saves or publishes a release automatically. If any statement or final validation fails, none of the script's design edits are applied.

Statements and quoting

Separate commands with semicolons or new lines. Names and field keys are case-sensitive. Quote arguments containing spaces or semicolons with single or double quotes. Inside quotes, use \n for a new line, \t for a tab and \\ for a backslash. Escape a quote with a backslash. Lines beginning with // are comments. A semicolon inside quotes belongs to the value.

// One value containing a semicolon
holderName="Frank; Jones";
field.set holderName format "Member: *";

A bare assignment uses all text after = as the value; unquoted leading/trailing whitespace is trimmed. Quote a value when those spaces matter. The scripting engine has no JavaScript evaluation, loops, functions, arbitrary network access or filesystem access. Limits: 2 MB of script text, 1000 statements and 10000 selected-object operations per run.

Selecting objects

Use select followed by one or more selectors. field:key includes all text/image placements and linked codes using that field, on both sides. id:svgId chooses a stable SVG element ID. layer:0/1 chooses a current layer path; paths can change after additions/reordering, so IDs are preferable. label:Exact label chooses matching artwork labels. tag:rect chooses that element type on the current default side. side:rear chooses top-level items on that surface. all selects top-level items on the default side; none clears the selection.

list layers;
select id:your-panel-id;
set fill "#e8f1f6";
select "label:Company logo";
move 1 0;

Selection is the script's working selection. It is reported in the output and retained between successful runs while the Scripts panel remains mounted. It does not depend on which field happened to be clicked on the canvas. Adding/duplicating an item selects the new item(s). Selecting a group and its child operates on the group once.

Units and geometry

Move, position, size, surface dimensions, textbox dimensions and fit widths use millimetres. Position means the top-left of the measured bounding box within the object's own surface. Transforming a parent group is accounted for. Scale uses factors; rotate uses clockwise degrees. Font sizes, padding, stroke-width and raw data-* dimensions use local SVG units. Use size for physical QR/barcode dimensions; QR codes stay square.

Alignment and gap spacing operate within one side at a time. Select at least two objects for alignment/increase/decrease, and at least three for equal gaps. They use the combined selection's outer bounds. Text and artwork sizes are measured in the browser with the same editor preview. Rotated textboxes/codes keep their local axes when resizing.

Values, formats and field options

Field assignments and text commands store raw sample values. A field format such as 101-* is applied by the shared renderer; do not include the prefix in the raw value as well. Visible controls the personalisation form, not visibility on the card. Start blank clears the initial value when personalisation starts; it does not erase the design's sample text. Required is checked for visible fields at finalisation.

field.set holderName required true;
field.set holderName visible true;
field.set holderName startBlank false;
field.set holderName format "Member: *";

CFQL background

This engine keeps the familiar field=value and semicolon approach from CFQL Manager. It is a new PersoFiles command language, not a compatibility interpreter for every old CFQL keyword. Only the commands documented here are supported. Unknown commands produce an error with the source line. Undo/redo, saving, publishing releases, library deletion, zoom and editor-only diagnostic views remain explicit controls in the app.

Scripting engine 1.0.0 · This reference is generated from the implemented command catalogue.