# Print Bridge — Designer PC Setup (one time, ~15 minutes)

This connects the designer's CorelDRAW PC to the 360LM VPS. After setup, adjustment/export
jobs arrive automatically in a synced folder, CorelDRAW processes them unattended in the
background, and results sync back. Nothing else changes about how the designer works.

## Prerequisites on this PC
- CorelDRAW installed (any recent version — the watcher logs the version it finds)
- Windows 10/11, logged-in user account (no admin needed except Syncthing install)

## Step 1 — Install Syncthing
Download **SyncTrayzor** (https://github.com/GermanCoding/SyncTrayzor/releases → `SyncTrayzorSetup-x64.exe`)
and install with defaults. (Same tool already used on Harish's laptop.)

## Step 2 — Pair with the VPS
1. In SyncTrayzor: **Add Remote Device** and enter this Device ID:
   `IC7AUJK-KTJT4SO-AU4Q7JX-ZVZJSSX-NO6M6QJ-ZL435R3-NWYN5BW-UQCOOAY`  (name it `vps-360lm`)
2. Tell Harish the **local Device ID** shown under Actions → Show ID — the VPS must
   approve and share the folder from its side.
3. A prompt appears: *"vps-obsidian wants to share folder Print Bridge"* → **Add**,
   choose local path `D:\PrintBridge` (or any drive with space).

## Step 3 — Install the watcher
Once the folder has synced (you'll see `jobs/ out/ setup/ …` inside), open PowerShell
(normal user), and run:
```powershell
cd D:\PrintBridge\setup
powershell -ExecutionPolicy Bypass -File .\install.ps1
```
This registers a background task ("VCC Print Bridge") that checks for jobs every 5 minutes.

## Step 4 — Self-test
Ask Harish/VCC to queue the test job. Within ~5 minutes `out\selftest\` should contain a
PDF + result.json. Done.

## How jobs look
- A job = `jobs/<id>.job.json` + the source `.cdr` (both arrive via sync)
- The watcher opens the CDR in CorelDRAW (invisible), optionally resizes proportionally,
  exports PDF (and optionally an adjusted .cdr), writes `out/<id>/…` + `<id>.result.json`
- The VPS converts the PDF to the print TIF (100 DPI, CMYK, LZW) automatically
- Failures land in `failed/` with the error in the result JSON — nothing is ever deleted

## Notes
- The watcher script itself lives in this synced folder — updates arrive automatically
  from the VPS; no reinstallation ever needed.
- **The watcher NEVER touches a CorelDRAW the designer is using.** It checks first: if
  CorelDRAW is already running, it defers (jobs stay queued, retried every 5 min) and
  processes only when CorelDRAW is closed — so it can safely own and quit the instance it
  creates. The designer's live sessions and unsaved work are never at risk.
- Because of that guard: jobs process during gaps when CorelDRAW is closed (lunch, EOD,
  or a manual close). For an urgent job, the designer just closes CorelDRAW and the next
  pass (≤5 min) picks it up.
- ⚠️ **Do not run the Step 1 COM check or a manual `watcher.ps1` pass while CorelDRAW is open
  with unsaved work** — the COM check itself can attach to the live instance. Close CorelDRAW first.
