# CHEQUE.IO — Troubleshooting Guide

## Purpose
Diagnose and fix common issues encountered when using CHEQUE.IO.

---

## Printing Issues

### Problem: Printed text is too high / too low
**Cause**: Printer margin offset, paper tray calibration variance.
**Fix**: In the Print Engine, adjust **Y Offset**:
- Text prints too LOW → decrease Y Offset (e.g., set to -2.0)
- Text prints too HIGH → increase Y Offset (e.g., set to +2.0)
Start with 0.5mm increments. Test on blank paper before using a real cheque leaf.

### Problem: Printed text is too far left / right
**Cause**: Printer horizontal margin offset.
**Fix**: Adjust **X Offset**:
- Text prints too FAR RIGHT → decrease X Offset (e.g., set to -1.5)
- Text prints too FAR LEFT → increase X Offset (e.g., set to +1.5)

### Problem: Layout is completely wrong — text scattered across page
**Cause**: Browser zoom is not 100%, or print scale is not 100%.
**Fix**:
1. Press Ctrl+0 (Cmd+0 on Mac) to reset browser zoom to 100%
2. In print dialog, set Scale to "100" or "Default"
3. Ensure "Fit to Page" is NOT selected

### Problem: Amount text overflows cheque box
**Cause**: Very large amounts generate long "amount in words" text.
**Fix**: CHEQUE.IO will auto-wrap. If it still overflows, reduce font size in print CSS (developer workaround). This is a known limitation for amounts above ₹10 crore.

### Problem: RTGS back side prints on the same side as front
**Cause**: Printer does not support duplex (two-sided) printing.
**Fix**: Print front side first. Remove the printed cheque from output tray. Flip it manually and reinsert into the paper input tray. Then print back side. Adjust Y Offset for the back side independently.

---

## Data Issues

### Problem: All my cheque records disappeared
**Cause**: Browser cache was cleared, browser data reset, or localStorage was manually cleared.
**Fix**: Unfortunately, localStorage data cannot be recovered once cleared. 
**Prevention**: Print the monthly report regularly as a paper backup.

### Problem: Records are missing after using a different browser
**Cause**: localStorage is browser-specific. Data in Chrome does not appear in Firefox.
**Fix**: Always use the same browser on the same device. There is no cross-browser sync.

### Problem: The issued cheques table is empty
**Cause**: No records have been saved yet, or the browser was switched.
**Fix**: Navigate to "Issue Cheque" tab and log a new record. The table populates from localStorage.

---

## UI Issues

### Problem: The cheque preview area is blank
**Cause**: No cheque record is selected in the Print Engine dropdown.
**Fix**: Select a record from the "Select Issued Cheque" dropdown. If the dropdown is empty, go to the Issue Cheque tab first and save a record.

### Problem: Dark/Light theme does not persist after refresh
**Cause**: Theme preference is not yet stored in localStorage (planned feature).
**Fix**: Toggle theme each session as needed. This is noted in the roadmap.

### Problem: Print button does nothing
**Cause**: Browser popup blocker may be preventing the print dialog.
**Fix**: Allow popups for cheque-io.vercel.app in browser settings, then try again.

---

## Deployment Issues

### Problem: Application does not load after Vercel deployment
**Cause**: `vercel.json` configuration may need adjustment.
**Fix**: Ensure your `vercel.json` sets all routes to serve `index.html`:
```json
{
  "rewrites": [{ "source": "/(.*)", "destination": "/index.html" }]
}
```

### Problem: Changes to source code are not reflected after push
**Cause**: Vercel CDN caching.
**Fix**: Hard refresh (Ctrl+Shift+R) or wait 30–60 seconds for Vercel to propagate the new deployment.

---
**Machine Summary**: Troubleshooting guide for print alignment (X/Y offsets), data loss (localStorage cleared), browser compatibility, UI issues (blank preview), and Vercel deployment problems.

**Last Updated**: 2026-07-07
