Issue: Marker boxes were misaligned with actual PDF content Cause: Coordinate system mismatch between PDF (72 DPI) and rendered images (150 DPI) Fix: Apply proper DPI scaling factor to coordinates Changes: - Calculate scale factor: DPI / 72 (e.g., 150/72 = 2.083) - Scale all x/y coordinates before drawing - Store page_image_dpi in JSON for frontend - Add debug console logs to verify scaling Formula: - pixel_coordinate = pdf_coordinate × (image_dpi / 72) - Example: 100 points @ 150 DPI = 208 pixels Now markers should align perfectly with PDF content! 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
17 KiB
17 KiB