Copy link to clipboard
Copied
Ok, I am trying to do something and have decided to try a different approach...
I have a series of pages set up as follows.
I have a page. A layer with a logo A layer of text A second layer of text
------------- ------------- ------------- -------------
| | | S$$ | | | | |
| | | | | Text | | text |
| | | | | | | text |
------------- ------------- ------------- -------------
I am turning the text to outlines and want to resize the page to fit the lowest bound of the <compound path> created.
psuedocode would be
CreateOutline()
var cutLine = <compound path> Y + height
FWIW: Would you like to do this with a facing pages document where the pages are left or right from a spine?
Be warned, that in the moment you change the width of a page the edge of a page will snap to the spine.
Well, and in the same moment the object could be partly or entirely outside of the page on the pasteboard.
That means: In this case you have to move the object as well. Not only to resize the page.
This thread should answer all or nearly all of your questions:
Is there a script to
...That definitely helped!
What I finally did was this incase it can help anyone in the future.
currentPage.textFrames.everyItem().createOutlines();
//Select items on current page
for (var j=0; j<currentPage.pageItems.length; j++)
{
currentPage.pageItems.everyItem().select();
}
//Get outer bounds of selection for resize
var gb = app.activeDocument.selection[0].geometricBounds;
//Resize vertical banners
currentPage.resize(
...
Copy link to clipboard
Copied
FWIW: Would you like to do this with a facing pages document where the pages are left or right from a spine?
Be warned, that in the moment you change the width of a page the edge of a page will snap to the spine.
Well, and in the same moment the object could be partly or entirely outside of the page on the pasteboard.
That means: In this case you have to move the object as well. Not only to resize the page.
This thread should answer all or nearly all of your questions:
Is there a script to shirnk the Artboard to a selected Textbox?
cbishop01, Jan 08, 2018
Regards,
Uwe Laubender
( ACP )
Copy link to clipboard
Copied
That definitely helped!
What I finally did was this incase it can help anyone in the future.
currentPage.textFrames.everyItem().createOutlines();
//Select items on current page
for (var j=0; j<currentPage.pageItems.length; j++)
{
currentPage.pageItems.everyItem().select();
}
//Get outer bounds of selection for resize
var gb = app.activeDocument.selection[0].geometricBounds;
//Resize vertical banners
currentPage.resize(CoordinateSpaces.INNER_COORDINATES,
AnchorPoint.TOP_LEFT_ANCHOR,
ResizeMethods.REPLACING_CURRENT_DIMENSIONS_WITH,
[2000, gb[2]] );
Thanks all! Especially Uwe who was helping me try a different approach in a seperate thread.
Copy link to clipboard
Copied
Hi there,
I'm hoping that the issue is resolved for you.
If the above-mentioned solution or suggestion helped, please mark it correct.
If not, do let us know so that we can assist you further.
Regards,
Sheena