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

Yeah, but I've got 70 pages or so and I want all of them cropped to the same margins around the text. These pages were scanned on an 8.5x11 scanner, but the pages themselves were smaller than that. so there are different size margins on each image.

The best way I can think of to crop all the pages identically is to base it off the location of the page number.


rea5245  wrote

Yeah, but I've got 70 pages or so and I want all of them cropped to the same margins around the text. These pages were scanned on an 8.5x11 scanner, but the pages themselves were smaller than that. so there are different size margins on each image.

If you're still keen on using Photoshop for this, create a Crop Preset.   In this example, my crop tool is set to 8.5 in wide x 11 in high and 150 ppi.  That way, you get the same size every time.

Nancy O'Shea— Product User & Community Expert