{"id":178,"date":"2026-05-24T08:24:38","date_gmt":"2026-05-24T08:24:38","guid":{"rendered":"https:\/\/convert.forethought-studio.com\/pdf-deskew\/"},"modified":"2026-06-11T18:11:32","modified_gmt":"2026-06-11T18:11:32","slug":"pdf-deskew","status":"publish","type":"page","link":"https:\/\/www.forethought-studio.com\/convert\/pdf-deskew\/","title":{"rendered":"Deskew PDF scans without uploading your file"},"content":{"rendered":"<p>Fix crooked scanned PDF pages without uploading the file. Drop a PDF here to straighten image-only pages while leaving searchable text pages untouched.<\/p>\n<div class=\"dropformat-mount\" data-format=\"pdf-deskew\"><div class=\"dropformat-dropzone dft-skeleton\" aria-hidden=\"true\"><p class=\"ec-dropzone-prompt\">Drop a PDF here, or <button type=\"button\" class=\"ec-pick-btn\" disabled>choose files<\/button><\/p><p class=\"ec-status\"><\/p><\/div><div class=\"df-loading-overlay\" role=\"status\" aria-live=\"polite\"><span class=\"df-loading-overlay-spinner\" aria-hidden=\"true\"><\/span><span class=\"df-loading-overlay-label\">Loading converter...<\/span><\/div><noscript><p class=\"df-noscript-message\">This converter requires JavaScript in your browser.<\/p><\/noscript><\/div>\n<p>The deskew pass runs entirely in your browser. DropFormat checks each page, skips pages that already contain selectable text, rotates scanned image pages when a confident angle is found, and builds a new PDF locally.<\/p>\n<p>Use the quality slider to keep scanned text sharp. If automatic detection misses a page, the force-angle field lets you apply a corrective angle between -15 and 15 degrees.<\/p>\n<h2>How it works<\/h2>\n<p>The tool renders image-only pages with pdf.js, estimates the skew angle with several browser-side detectors, rotates the page image, and writes the result with pdf-lib. Page count and page dimensions are preserved.<\/p>\n<p>Pages with selectable text are copied instead of flattened so searchable text stays searchable. Pages that are already straight, blank, or too ambiguous to measure are reported in the result summary instead of being silently changed.<\/p>\n<h2>Common questions<\/h2>\n<p><strong>Will OCR text stay selectable?<\/strong> Yes. If a page has selectable text, the deskew tool skips that page and copies it into the output PDF.<\/p>\n<p><strong>What does force angle mean?<\/strong> It is the corrective rotation applied to image-only pages. Leave it blank for automatic detection. Use it only when you know the scan needs a specific rotation.<\/p>\n<p><strong>Are my PDF pages uploaded?<\/strong> No. The PDF is read, rendered, rotated, and saved in your browser tab. Error reports include file metadata and the error message, never file contents.<\/p>\n<h2>Accuracy benchmark<\/h2>\n<p>The deskew detector that ships in DropFormat was benchmarked on 642 synthetic skewed PDF pages between -15 and +15 degrees of skew, against the four classical detector methods that existing open-source deskew tools draw from. Each method ran on the same rasterized pages in the same browser. The consensus detector that ships in the product had the lowest 95th-percentile error, no wrong-direction corrections, and only abstained on 8 of 642 cases.<\/p>\n<table class=\"df-benchmark\" aria-describedby=\"df-benchmark-caption\">\n<caption id=\"df-benchmark-caption\">Per-method accuracy across 642 synthetic skewed PDF pages, -15deg to +15deg in 0.1deg steps on body text and tables, plus stress angles on multi-column, low-density, dark-background, and low-DPI fixtures. Lower is better for every column except Confident pages.<\/caption>\n<thead>\n<tr>\n<th scope=\"col\">Detector<\/th>\n<th scope=\"col\">Median absolute error (deg)<\/th>\n<th scope=\"col\">95th-percentile error (deg)<\/th>\n<th scope=\"col\">Maximum error (deg)<\/th>\n<th scope=\"col\">Wrong-direction rate<\/th>\n<th scope=\"col\">Confident pages<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th scope=\"row\"><strong>DropFormat consensus<\/strong><\/th>\n<td>0.04<\/td>\n<td>0.127<\/td>\n<td>1.235<\/td>\n<td>0%<\/td>\n<td>634 \/ 642<\/td>\n<\/tr>\n<tr>\n<th scope=\"row\">Projection-profile variance (used by ImageMagick deskew)<\/th>\n<td>0.025<\/td>\n<td>0.12<\/td>\n<td>5.58<\/td>\n<td>0%<\/td>\n<td>642 \/ 642<\/td>\n<\/tr>\n<tr>\n<th scope=\"row\">Hough transform (textbook edge voting)<\/th>\n<td>7.455<\/td>\n<td>14.3<\/td>\n<td>15<\/td>\n<td>0%<\/td>\n<td>642 \/ 642<\/td>\n<\/tr>\n<tr>\n<th scope=\"row\">Fourier-domain line energy<\/th>\n<td>0.177<\/td>\n<td>0.483<\/td>\n<td>27.867<\/td>\n<td>1.71%<\/td>\n<td>642 \/ 642<\/td>\n<\/tr>\n<tr>\n<th scope=\"row\">Connected components baseline fit<\/th>\n<td>1.083<\/td>\n<td>1.225<\/td>\n<td>1.289<\/td>\n<td>1.18%<\/td>\n<td>424 \/ 642<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The takeaway is the spread between the columns, not any single row. Projection-profile has a lower median than the consensus on this corpus but a 5.58 degree maximum error on the inverted-scan and ruled-table fixtures. Hough has 7.455 degree median error because page rules dominate the edge vote. Fourier rotates pages the wrong way 1.71 percent of the time. Connected components only finds enough glyphs to commit to an angle for two thirds of the corpus. The consensus rule trades a small amount of median accuracy for a flat tail and a zero wrong-direction rate.<\/p>\n<p>The corpus, the detector code, and the consensus rule live in the open-source plugin that runs this site. The benchmark summary is in <code>docs\/decisions\/pdf-deskew-benchmark.json<\/code> and the methodology is written up at <a href=\"\/pdf-deskew-methodology\/\">How we measured PDF deskew accuracy<\/a>. Both can be regenerated locally with <code>node scripts\/pdf-deskew-accuracy-spike.js --profile decision<\/code>.<\/p>\n<nav class=\"df-related\" aria-label=\"Related tools\">\n<h2>Related tools<\/h2>\n<ul>\n<li><a href=\"\/compress-pdf\/\">Compress PDF<\/a><\/li>\n<li><a href=\"\/split-pdf\/\">Split PDF<\/a><\/li>\n<li><a href=\"\/merge-pdf\/\">Merge PDF<\/a><\/li>\n<li><a href=\"\/pdf-to-jpg\/\">PDF to JPG<\/a><\/li>\n<li><a href=\"\/pdf-to-png\/\">PDF to PNG<\/a><\/li>\n<\/ul>\n<\/nav>\n","protected":false},"excerpt":{"rendered":"<p>Fix crooked scanned PDF pages without uploading the file. Drop a PDF here to straighten image-only pages while leaving searchable text pages untouched. The deskew pass runs entirely in your browser. DropFormat checks each page, skips pages that already contain selectable text, rotates scanned image pages when a confident angle is found, and builds a [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-178","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.forethought-studio.com\/convert\/wp-json\/wp\/v2\/pages\/178","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.forethought-studio.com\/convert\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.forethought-studio.com\/convert\/wp-json\/wp\/v2\/types\/page"}],"replies":[{"embeddable":true,"href":"https:\/\/www.forethought-studio.com\/convert\/wp-json\/wp\/v2\/comments?post=178"}],"version-history":[{"count":1,"href":"https:\/\/www.forethought-studio.com\/convert\/wp-json\/wp\/v2\/pages\/178\/revisions"}],"predecessor-version":[{"id":211,"href":"https:\/\/www.forethought-studio.com\/convert\/wp-json\/wp\/v2\/pages\/178\/revisions\/211"}],"wp:attachment":[{"href":"https:\/\/www.forethought-studio.com\/convert\/wp-json\/wp\/v2\/media?parent=178"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}