LAAM Illustrator Scripts
All tutorials 中文說明
English guideline

Price Tag Generator.

Build multiple Illustrator price tags from one or more named templates and a UTF-8 CSV. The generator handles text, prices, numbered logos, QR codes, optional assets, bleed-aware artboards and print sheets.

Guide for v1.11 Adobe Illustrator JSX

Install and launch.

  1. Extract the complete generator folder. Keep the Launcher and Core file together.
  2. Open the template AI in Illustrator.
  3. Choose File → Scripts → Other Script….
  4. Select Price_Tag_Generator_Launcher_v1.11.jsx.
Always run the Launcher, not the .jsxinc Core file. The Launcher keeps the UI and Illustrator document actions in the correct engines.
Image placeholderassets/images/ptg-ui-overview.webp
Suggested: full Generator UI with Generate, Layout and Print tabs.

Screenshot slot — replace the inner span with an image when ready.

Name the Illustrator template.

Group the complete price-tag artwork, select the group and click Prepare Selection. The script names the active artboard and group from the active artboard size, for example PT_TEMPLATE_90x54.

Required objects

NamePurpose
PT_TITLEMain product title TextFrame.
PT_SUBTITLESubtitle TextFrame.
PT_INFOOne multiline product-information TextFrame.
PT_PRICE_LABELThe retail-price / currency label group.
PT_PRICE_VALUEThe numeric price TextFrame.

Common optional objects

NamePurpose
PT_LOGO + PT_LOGO_GUIDEFirst logo placeholder and key object. PT_LOGO_1 is also accepted.
PT_LOGO_2 + PT_LOGO_2_GUIDESecond numbered logo; continue with 3, 4 and so on.
PT_QR_CODE + PT_QR_CODE_GUIDEOptional QR artwork and contain area.
PT_BACKGROUND + PT_BACKGROUND_GUIDEOptional replacement background and cover area.
PT_PRODUCT_IMAGE + PT_PRODUCT_GUIDEOptional product image and fit area.
PT_PRICE_ANCHOROptional bottom-right anchor for the full price block.
PT_PRICE_SAFEOptional safe area used to shrink long price values.
Image placeholderassets/images/template-object-names.webp
Suggested: Illustrator Layers panel showing every PT_ object.

Screenshot slot — template group and Layers panel.

Place each logo around its GUIDE.

Every numbered logo can use its own CSV alignment value. GUIDE remains the key object, but v1.10 uses an external 3 × 3 placement: the nearest logo edge is joined to the selected GUIDE anchor. Only center overlaps both centres.

top_left
top_center
top_right
middle_left
center
middle_right
bottom_left
bottom_center
bottom_right
CSV valueAnchor join
top_leftLogo bottom-right → GUIDE top-left.
top_centerLogo bottom-centre → GUIDE top-centre.
top_rightLogo bottom-left → GUIDE top-right.
middle_leftLogo middle-right → GUIDE middle-left.
centerLogo centre → GUIDE centre.
middle_rightLogo middle-left → GUIDE middle-right.
bottom_leftLogo top-right → GUIDE bottom-left.
bottom_centerLogo top-centre → GUIDE bottom-centre.
bottom_rightLogo top-left → GUIDE bottom-right.

The global X/Y offsets in Settings are applied after this anchor join. Positive X moves right; positive Y moves down.

Image placeholderassets/images/logo-guide-alignment.webp
Suggested: real Illustrator result with red GUIDE and two different logos.

Screenshot slot — a real logo alignment example.

Build a flexible UTF-8 CSV.

Save the data as CSV UTF-8 (Comma delimited). One row creates one price tag. Paths may be relative to the CSV folder or the Assets folder selected in the UI.

ColumnMeaning
template_idTemplate size ID such as 90x54. Blank uses the UI default.
output_nameReadable artboard name; SKU is used as fallback.
title, subtitleMain text fields.
info_1, info_2info_nDetected dynamically and combined into the multiline PT_INFO object.
priceNumeric value. Format 1,000 can be enabled in Layout.
logo_1_file, logo_1_alignFirst logo file and external GUIDE position.
logo_2_file, logo_2_alignSecond logo. Continue the same numbered pattern as required.
qr_code_fileOptional QR code path.
background_fileOptional replacement background path.
product_image_fileOptional product image path.
Info columns have no fixed five-line limit. Add info_6, info_7 or higher as required. Values are sorted numerically, blank cells are skipped, and info_10 correctly follows info_9. The visible result is still limited by the height of PT_INFO / PT_INFO_GUIDE and the minimum Auto-fit font size.
template_id,output_name,title,subtitle,info_1,info_2,info_6,price,logo_1_file,logo_1_align,logo_2_file,logo_2_align,qr_code_file
90x54,HC5,"HC 5 Portable USB DAC","Flagship portable DAC","1. Dual-DAC architecture","2. OLED display","6. Extra information",3680,logos/brand.ai,top_right,logos/partner.svg,bottom_left,qr/hc5.png
Image placeholderassets/images/csv-example.webp
Suggested: CSV open in Excel with logo_1 / logo_2 columns visible.

Screenshot slot — keep the numbered logo columns visible.

Add assets only when the row needs them.

Logo, QR, product and optional image fields support Illustrator-placeable artwork including SVG, AI, PNG, JPG/JPEG, PDF, EPS, TIFF and PSD. A blank cell keeps the template object. Enter none or - to hide it.

Flexible optional columns

CSV columnIllustrator objectUse
asset_badge_filePT_ASSET_BADGEPlace any optional image.
asset_badge_fitPT_ASSET_BADGE_GUIDEcontain or cover.
text_promoPT_TEXT_PROMOReplace an optional TextFrame.
show_asset_badgePT_ASSET_BADGEShow with yes/true/1; hide with no/false/0.
Replace badge with any consistent key such as warranty, member_icon or energy_label. Missing optional columns do not change that object.

Generate a centred, bleed-aware layout.

  • Same template document or New document.
  • Fixed column count or automatic balanced grid.
  • Left-to-right, then top-to-bottom order.
  • Grid centred away from slow canvas edges.
  • Bleed included in spacing calculations.
  • Large Canvas retry when required.

New-document names

If the template is named HC5_Template.ai, Layout creates an unsaved document named HC5_Template_Price_Tag.ai. Print Sheets creates HC5_Template_Price_Tag_Print.ai. You still choose the final save folder.

Auto and manual bleed

Auto mode reads Illustrator Document Setup when available, then checks a saved PDF-compatible AI. Manual mode uses the entered millimetre value. New-document bleed is verified before the final output document is accepted.

Same template document mode cannot rewrite that document’s existing Document Setup. Manual bleed still controls generated spacing and Print Sheets. Choose New document when the output itself must receive new bleed values.
Image placeholderassets/images/bleed-layout.webp
Suggested: several centred artboards with visible red bleed bounds and gap.

Screenshot slot — show how bleed and gap prevent overlap.

Impose production-ready Print Sheets.

On the Print tab, enable Create print sheets and select A6–A1 paper, orientation, copies per tag, page margin, item gap and Trim Mark settings.

  1. Copies stay consecutive: A, A, A, B, B, B, C, C, C.
  2. Each price tag is duplicated into its own clipping group.
  3. With bleed, the clipping mask includes trim plus bleed artwork.
  4. Trim Marks appear only when bleed exists, and remain aligned to the trim artboard.
  5. Overflow continues on the next paper artboard without changing order.
Image placeholderassets/images/print-sheets.webp
Suggested: A4 Print Sheet with repeated tags, clipping masks and Trim Marks.

Screenshot slot — a complete A4 or A3 imposed sheet.

Recommended production workflow.

  1. Open and save the PDF-compatible template AI.
  2. Select the full tag group and run Prepare Selection once.
  3. Name the required and optional child objects.
  4. Click Check Template until it reports Ready.
  5. Choose the UTF-8 CSV and any file inside the Assets folder.
  6. Set Layout, bleed and Print options.
  7. Run Preview First and inspect logo placement, text fit and price spacing.
  8. Run Generate All and save the new Layout / Print documents.

When something fails.

Message / resultWhat to check
“There is no document”Open the template AI before Prepare, Check or Generate.
Template reports missing namesExpand the prepared group and verify the exact required PT_ names.
Logo too large or visually offsetCrop transparent pixels, verify its own GUIDE and choose the correct external logo_n_align.
Asset not foundCheck spelling, extension and whether the relative path starts from the CSV or selected Assets folder.
Bleed is zero in AutoSave the template with PDF compatibility after changing Document Setup, then Check Template again.
Print Sheet is emptyConfirm at least one tag generated successfully and Create print sheets is enabled.

Open Debug / Logs and keep the last error block when reporting a problem.

Image placeholderassets/images/debug-log.webp
Suggested: Debug / Logs window highlighting the final error block.

Screenshot slot — show the useful part of a debug log.