========================================================================
PDF Imposition Scripts for Adobe InDesign (v6.0)
========================================================================

Available Versions:
* PDF_Imposition_manual.jsx — manual page count entry.
* PDF_Imposition_auto_page_num.jsx — automatic page count detection.

1. Multi-Unit Support (Metric & Imperial)
   - Millimeters (mm) & Inches (in): Configurable startup defaults (using UNIT_DEFAULT = "mm" or "in").
   - Independent Layout & Sheet Presets:
     * Metric (mm) presets: Layouts (216x303, 152x214, 150x110, 110x75), Sheets (320x470 SRA3 V, 230x320 SRA3 H, 210x297 A4 V, 297x210 A4 H).
     * Imperial (inches) US standard presets: Layouts (8.5x11 Letter, 5.5x8.5 Half Letter, 4x6 Postcard, 3.5x2 Business Card), Sheets (13x19 Tabloid Extra, 12x18 Digital Press, 11x17 Tabloid, 8.5x11 Letter).
   - Preset switching: Seamlessly switches preset dimensions, textboxes, and labels between Metric and Imperial values.
   - Smart Rounding: Layout and sheet values convert and round to 3 decimal places in inches, while crop marks and bleed parameters round to clean, standard single-decimal metrics (e.g. 2mm is rounded cleanly to 0.1 in).

2. Manual & Auto Page Count Detection
   - Pre-fills quantity using quick automatic PDF page count calculation on load (logarithmic binary search engine).
   - Binary Search vs. Linear Search Comparison:
     +----------------+--------------------------+------------------------------+
     | PDF Pages      | Standard Linear Search   | Binary Search (Auto version) |
     |                | (Checks every page)      | (Highly optimized search)    |
     +----------------+--------------------------+------------------------------+
     | 16             | 17 checks                | 10 checks                    |
     | 100            | 101 checks               | 14 checks                    |
     | 500            | 501 checks               | 18 checks                    |
     | 1000           | 1001 checks              | 20 checks                    |
     | 10000          | 10001 checks             | 26 checks                    |
     +----------------+--------------------------+------------------------------+

========================================================================

Need Photoshop ↔ ComfyUI integration?
ph-cu-s.com
