Script to fit group of objects to page proportionally.
I need to go through a large document that have individual items on each page (text boxes, picture boxes, rectangles of different colors etc.)
At the moment I am doing this manually for each page:
1-group all items on the page
2-manually enlarge proportionally, and fit to page
(I use fn+Cmnd+Shift while resizing the group) so all objects including text and pictures would scale accordingly.
This is a repetitive task and seems that I will have to do the same on new documents I will recive. So I was wondering if there is a way of doing this with a script.
I found this:
var doc = app.activeDocument;
var myPage = doc.pages[0];
var fit = myPage.bounds;
var myFrame = app.selection[0];
myFrame.geometricBounds = fit;
The above is similar to what I am after but it scales the objects, and the contents remain the same. So for instance, it will enlarge the text box but the text stays the same size.
Is there a way of scaling to fit the page with contents and and keeping the proportions? Maybe a shortcut or better still a script? Or maybe I could tweak the script above so that it scales pictures and text proportionally?
Any guidance or ideas welcome.
Thanks.
