docs/tools/deskew-pdf.md
Scanned documents are rarely perfectly straight. Even a slight tilt makes OCR less accurate and printing look sloppy. This tool uses OpenCV's image processing algorithms to detect the skew angle of each page and rotate it back to level.
| Setting | Values | Default |
|---|---|---|
| Skew Threshold | 0.1, 0.5, 1.0, 2.0 degrees | 0.5 |
| Processing DPI | 100, 150, 200, 300 | 150 |
The tool renders each page to an image at the selected DPI, then uses OpenCV to detect dominant line angles in the content. If the detected skew exceeds the threshold, the page is rotated by the inverse angle to straighten it. Pages below the threshold are passed through unchanged.