Acrobat -- Deskew PDF Pages




Direct purchase using PayPal ($60 only per license)!

One of the most common problems with scanned pages is that they are are skewed by a couple degrees, which can be annoying and unpleasant to the viewer. It can also cause problems with processes such as Optical Character Recognition (OCR). Many times these processes attempt to manually correct those scans by rotating them backwards (deskewing them), but that's not always successful or even possible (for example with non-scanned documents). So how to solve this problem?

Well, with this new tool you can easily deskew some, or all, the pages of a PDF file, in either an automatic or a manual process.

Let's have a look at an example: This is our original file with skewed pages that we want to rotate.
Notice the script is installed and available under Tools - Add-On Tools.

The original first page of the file (click to enlarge)

So how do we do it? We use the Line commenting tool to draw a line that represents the angle in which we want to rotate the page. So if there's a table on the page, for example, that line should be parallel to its top border:

The skewed page with the line we added to it
After adding the line we select it (multiple lines on multiple pages can be selected at once in the Comments List panel). We then run the script and in the Properties dialog select to use the "Selected Annotations" option.
If we want we can also select to remove these lines after the pages are processed.


The script's properties dialog
 And the result is...

First page after automatic deskewing
As you can see, the result is pretty good: The page is much straighter now.
We can find out by how many degrees (clockwise) it was rotated by opening the JS Console (Ctrl+J):

The automatic rotation angle for page #1.
(Although the value is a fraction, in fact the rotation is in whole degrees only)

Now lets say we want to specify ourselves by how many degrees to rotate the page.
We take page #2 of the same document and run the script once more...


The original page #2
 This time in the Properties dialog we select to process the current page only and enter the degrees manually as "-2" (since we want to rotate it counter-clockwise):

 

And the results look pretty good once again:


We can now process the rest of the pages using the same setting, if we wish.

Important note: This process will NOT affect objects on the page such as form fields, annotations, links, etc. They will all remain in tact.

For more information about this tool, you can contact me directly.

No comments: