- Estimate the true paper aspect from the perspective of the four corners (Zhang & He) and snap to A-series/Letter, instead of stretching to the longest edges. - Keep native resolution (1754-3508px long side) and warp with cubic interpolation, trimming a thin border. - Replace the global contrast tweak with OpenCV scan filters: illumination flattening (background division) plus ink levels and sharpening for color/gray, adaptive threshold for B&W, and an original mode. - Export color pages as JPEG, size PDF pages to A4 and scale OCR text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>