Stencil/ InDesign
Adobe InDesign · on-brand at scale

On-brand layouts, scripted — not hand-edited.

The reason AI keeps breaking your InDesign templates is simple: it's re-drawing the layout by hand. We don't. We lock your brand into the template and let the AI fill only the content — through InDesign's own scripting engine. The layout can't move. The output is a print-ready, on-brand PDF, every time.

ExtendScript / UXP engine Data Merge for batches 0 hand-editing the layout Animation panel motion in-template PDF/X print-ready out
Why it goes wrong today

Editing a layout is where drift happens.

⚠ AI editing the layout by hand
  • Nudges frames, overrides paragraph styles, swaps fonts it "prefers"
  • Re-flows text, breaks the baseline grid and safe margins
  • Every run comes out a little different — no consistency
  • A designer has to open each file and fix it
✓ AI filling a locked template
  • The .indd holds the brand — styles, grid, colours, logo, margins
  • The AI writes to named frames only; it never touches geometry
  • InDesign renders it exactly, from its own scripting engine
  • Nothing to check — correct by construction, or it doesn't run
The pipeline

Content in, print-ready PDF out.

One brief becomes a finished, on-brand InDesign document — no designer in the loop for the routine runs.

LOCKED

Brand template

Your .indt with named frames (script labels) as the only editable slots.

STEP 01

AI writes content

Copy + image choices from a brief, feed or calendar — the parts that vary.

STEP 02

Script fills slots

ExtendScript sets the text stories and places images into the named frames.

STEP 03

Fit & check

Images fit proportionally; overset text is caught, not shipped broken.

EXPORT

On-brand PDF

PDF/X for print; fixed-layout EPUB or Publish Online when the poster is animated.

Proof — the actual mechanism

Watch the script fill the template.

Real InDesign ExtendScript, running against a locked template. The AI's only input is the data payload below — edit it, run the script, and watch the document fill and export. The layout is never touched; that's why it can't go off-brand.

Editing the payload changes nothing until the script runs — that's the point. Tip: make the headline longer than 42 characters and the overset guardrail will refuse to ship it. payload changed — run the script again

on-brand-fill.jsx · Adobe InDesign · ExtendScript
// Fill a LOCKED brand template from data, then export a print-ready PDF.// The AI supplies only 'data' — it never edits the layout.#target indesign var data = {  headline: "Dawn dip, Saturday",  subline : "Meet at the boathouse, 6:45am. Water's 11°C.",  offer   : "Free for members",  image   : "~/brand/tidal/assets/dawn.jpg"}; // 1 · open the locked template (styles, grid, colours, logo already correct)var doc = app.open(File("~/brand/tidal/announce.indt")); // 2 · write ONLY to named frames (the template's script labels = the slots)function setSlot(name, value) {  var f = doc.pageItems.itemByName(name);  if (f.isValid && f.constructor.name == "TextFrame")    f.parentStory.contents = value;}setSlot("slot_headline", data.headline);setSlot("slot_subline",  data.subline);setSlot("slot_offer",    data.offer); // 3 · place the image into its frame — fit proportionally, never distortvar img = doc.pageItems.itemByName("slot_image");if (img.isValid) {  img.place(File(data.image));  img.fit(FitOptions.FILL_PROPORTIONALLY);} // 4 · guardrail — refuse to ship a broken layout (overset text)if (doc.stories.everyItem().overflows.join("").indexOf("true") > -1)  throw new Error("Overset text — content too long for the on-brand frame."); // 5 · export the on-brand, print-ready PDFdoc.exportFile(  ExportFormat.PDF_TYPE,  File("~/out/tidal-announce.pdf"),  false,  app.pdfExportPresets.itemByName("[High Quality Print]"));doc.close(SaveOptions.NO);
announce.indt · locked template PDF
COLD-WATER CLUB
NORWICH · EST 2021
slot_image
slot_headline
slot_subline
slot_offer
@tidalswim.nor
// idle — press ▶ Run script (or edit the payload first)
After export, the poster plays its template motion — InDesign Animation-panel presets saved in announce.indt animated output → fixed-layout EPUB / Publish Online · print → PDF/X
Same brief · one drifts, one can't

The output moves — and stays on-brand.

These posters are animated because the template is: motion presets saved in the locked .indt play on export. Watch both loops.

⚠ AI hand-editing
Dawn Dip Saturday
Free for members
wrong font · logo moved · off-brand motion
✓ Stencil · locked template
Dawn dip, Saturday
Free for members
brand locked
Fade In · logo Fly In from Bottom · headline Grow · offer InDesign Animation panel — Window → Interactive → Animation

Same three lines of content, both animated. Left: unconstrained AI — off-brand layout, off-brand motion. Right: the locked InDesign template, whose Animation-panel presets are part of the template itself. They play in fixed-layout EPUB and Publish Online exports; print runs export static PDF/X. Scripts can set and label the same animation properties.

Two ways to run it in InDesign

Live fills, or batch merges.

Scripting · dynamic

Named frames + ExtendScript

Best for one-off or on-demand assets. The AI decides the content, the script fills the named frames and exports. Handles images, styles, conditional slots — and can set and label the template's Animation-panel properties.

on-brand-fill.jsx · the script above
Data Merge · batch

CSV → whole campaign

Best for volume. A merge template + a data file (which the AI generates) produces a hundred on-brand documents in one pass — catalogues, price lists, localised sets.

campaign.csv → Data Merge → 100 × PDF
What you get

Their brand, filled by AI, out of InDesign — on-brand every time.

Point us at your InDesign template and brand. We wire the slots, connect the AI content, and hand back a one-click pipeline: brief in, on-brand output out — print-ready PDF/X, or animated posters via fixed-layout EPUB and Publish Online. No more fixing what the AI broke.