Verae TimeStamp PDF - Windows DEBUG test build
==============================================

What this build adds
--------------------
* "Verae TimeStamp PDF" printer (PRIMARY). It uses the built-in Microsoft IPP
  Class Driver and sends jobs to a local helper (verae-printhelper.exe) at
  http://127.0.0.1:8631/ipp/print. The helper runs as you, saves the PDF,
  timestamps it with Verae, and writes the certificate.
* "Verae TimeStamp PDF (Local Port)" printer (FALLBACK). It uses the built-in
  Microsoft Print To PDF driver and writes to
  C:\ProgramData\Verae\spool\fallback\verae-job.pdf. The same helper picks the
  file up.
* Heavy logging in C:\ProgramData\Verae\logs:
    installer-<time>.log          installer page/step log (no secrets)
    installer-details-<time>.log  copy of the installer's details pane
    install-<time>.log            printer-script transcript (every step OK/FAIL)
    install-summary-<time>.json
    helper-<user>.log             per-job IDs like J20261003-190000-ipp-1
    cli-<user>.log
* Start menu > Verae > "Collect diagnostics" puts verae-diag-<time>.zip on
  your Desktop.

Test steps
----------
1. Double-click VeraePrintStamp-windows-amd64-0.3.0-debug-setup.exe and accept
   the UAC prompt. If SmartScreen appears, choose More info > Run anyway (the
   build is unsigned). No console windows should appear at any point.
2. "Verae signing key" page: it shows your Windows user and any key it found
   (masked, e.g. xVerae-AbC1...9xYz), and whether Verae accepted it. Choose:
   * Keep the existing key, or
   * Sign in: email + password (+ authenticator code if you use 2FA). A new
     key named "Verae Print Stamp - <PC name> (windows)" is created and saved, or
   * Create a new Verae account: name, email, password + confirm (the strength
     rule is shown on the page). If the server supports it you get an emailed
     6-digit code on the next page ("Send a new code" resends it), or
   * Paste a key: "Open customer.verae.ai" > Security > create an xVerae- token,
     then paste it. The key is checked with Verae before you can continue, or
   * Skip for now: you are warned, and the helper asks for a key in a small
     window the first time you print.
   Your password goes only to https://customer.verae.ai and is never saved or
   logged. Only the key is saved, in %USERPROFILE%\.verae\xverae-token,
   readable only by you (and SYSTEM/Administrators).
3. The progress page shows each step. The finish page lists every step as
   OK / FAIL / SKIP (files, key, spooler, autostart task, helper running as
   you, both printers), with a link to open the logs folder. If something
   failed, a verae-diag-*.zip is already in the logs folder.
   Quick check in a normal PowerShell:
     Get-Printer | ? Name -like 'Verae*' | ft Name,DriverName,PortName
     & "C:\Program Files\Verae\PrintStamp\bin\verae-print.exe" ipp-selftest
   Expected: two printers, and "IPP helper OK".
4. Open Notepad, type something, File > Print, choose "Verae TimeStamp PDF",
   click Print.
   Within about 10 s you should get a balloon "Verae timestamp <receipt>", and
   these files in Documents\Verae Timestamps:
     <name>.pdf, <name>-verae-timestamp-<RECEIPT>.pdf, <name>.verae.json
5. Repeat step 4 with "Verae TimeStamp PDF (Local Port)". The file is named
   "Printed <date time>".
6. Repeat with Edge (a web page) and Word if installed.
7. Whatever happened, run Start > Verae > Collect diagnostics (right-click >
   More > Run as administrator for complete results) and send the zip from
   your Desktop.

If the printer does not appear
------------------------------
* Look in C:\ProgramData\Verae\logs\install-*.log for the first "RESULT: FAIL".
* Reinstall the printer only (elevated PowerShell):
    & "C:\Program Files\Verae\PrintStamp\scripts\install-printer.ps1"
* Is the helper running?
    Get-Process verae-printhelper
    netstat -ano | findstr 8631
  To start it: Start > Verae > Start print helper.
* For verbose IPP dumps, the installer sets HKLM\Software\Verae\PrintStamp
  Debug=1. Check helper-<user>.log for "ipp: request".

If jobs arrive as PWG raster instead of PDF
-------------------------------------------
The helper log says "received image/pwg-raster". Make the helper advertise PDF
only, then re-add the printer:
    setx VERAE_IPP_FORMATS application/pdf
    (sign out and back in, or restart the helper)
    Remove-Printer "Verae TimeStamp PDF"   (elevated)
    & "C:\Program Files\Verae\PrintStamp\scripts\install-printer.ps1" -SkipFallback

Uninstall
---------
Settings > Apps > "Verae Print Stamp (debug)", or run
"C:\Program Files\Verae\PrintStamp\Uninstall.exe". Logs are kept.
