Skip to main content
Known Participant
May 28, 2019
Question

Resize canvas around arbitrary anchor?

  • May 28, 2019
  • 4 replies
  • 1270 views

Hi,

When resizing a canvas, you can choose an anchor in the center, or any of the four sides or corners. But is there a way to specify an arbitrary location as the anchor? For example, I'd like to click on a point in an image and have the canvas resized so it's 800 pixels above that point, 200 pixels below, and 400 on the left and right.

(The reason is that I have a bunch of poorly scanned pages of a book. I need to deskew them, clean them up, and then crop them. The page number is in the same location on every page - center bottom - so I want to base the crop off the location of the page number.)

Thank you,

  Bob

This topic has been closed for replies.

4 replies

rea5245Author
Known Participant
May 29, 2019

Well apparently there's no built-in solution. So I wrote a script. I open the image of the page, manually put a selection box around the page number, then run the script. The script gets the coordinates of the selection and resizes the canvas so there's an 8.5x11 page with the page number positioned 3/4" from the bottom and in the horizontal center.

Bojan Živković11378569
Community Expert
Community Expert
May 29, 2019

You are looking for automation, right? Automation is probably doable if the number is consistent and always at the same relative position. That can be starting point to record action which will create vector rectangle/square  path at some certain position then resize it  using some specific anchor point, perhaps it will need to change path multiple times and lastly to convert path to selection followed by Image > Crop or to use the Crop tool. One more time: this is doable only if pages and numbers shares exact same dimensions and position.

jane-e
Community Expert
Community Expert
May 28, 2019

Have you also tested this in Acrobat to see if it works better?

rea5245Author
Known Participant
May 28, 2019

I don't have Acrobat. I could download a trial version, but what feature are you thinking would help here?

- Bob

jane-e
Community Expert
Community Expert
May 28, 2019
  1. First OCR
  2. Crop: I'm guessing on the amounts
  3. Finished page. Text searchable and can be editable. first
Nancy OShea
Community Expert
Community Expert
May 28, 2019

I am not convinced resizing canvas is how you should handle this.  Can you show us one of your scans  so we can see what you're working with?

Nancy O'Shea— Product User & Community Expert
rea5245Author
Known Participant
May 28, 2019

Here's one:

Nancy OShea
Community Expert
Community Expert
May 28, 2019

I simply used the Crop tool with a  bit or rotation.


For better precision, add some horizontal and vertical guidelines for reference

Nancy O'Shea— Product User & Community Expert