Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Hello, i know this is an old post, but maybe somebody can help me.
How can i use Kasicki's script and add a script that center the full arrange on the page?
thanks
Copy link to clipboard
Copied
1) copy, paste, and save it as a plain text file (e.g. in Notepad) with jsx or js extension.
Copy/move it to your Scripts Panel folder.
Select an object and run the script like so:
2) I don't know what exactly you want to achieve: how to align -- by page borders, margins, etc.
Here's an example. First, I make a group from all page items on the 1st page and then center it both horizontally and vertically relative to the page border. And finally I ungroup it.
main();
function main() {
var doc = app.activeDocument;
var page = doc.pages[0]; // the 1-st page
var items = doc.allPageItems;
var group = doc.groups.add(items);
doc.align(group, AlignOptions.HORIZONTAL_CENTERS, AlignDistributeBounds.PAGE_BOUNDS);
doc.align(group, AlignOptions.VERTICAL_CENTERS, AlignDistributeBounds.PAGE_BOUNDS);
group.ungroup();
}
Here are details for the align method.
Hope it helps!
— Kas
Copy link to clipboard
Copied
Thanks a lot!
Copy link to clipboard
Copied
Sadly..doesnt work. it says:
var group = doc.groups.add(items);
error 30477. "parámetro no valido" i'm using Indesing CC.
i try paste and copy severals scripts. but everytime i obtain the same result. Just center the first item (even if i group all the items in my script) or center just the first page.
Copy link to clipboard
Copied
I gave you an example of how to do this by script using a simple test file in the screenshot above. I can't tell you what goes wrong in your doc without having it.
Copy link to clipboard
Copied
Thanks! i try to do it better, and follow your instructions. I'm sure i make something wrong. thanks for your time.
Copy link to clipboard
Copied
Look at this, it might help...
https://www.marspremedia.com/software/indesign/step-and-repeat
Copy link to clipboard
Copied
Hello Mr Campbell! i test you script several weeks ago, and follow your youtube indesign script tutorials!..
but i'm just a worker, not an owner of the business, so...you know.. 😞 . thanks for your time and help.
Pd. Your indesing Swatch script is my favorite!
Copy link to clipboard
Copied
Great to hear. Thanks for watching the channel.
Copy link to clipboard
Copied
Hi, I hope someone can help me. How can I make this script work on a multi-page document? (for example, with a two faces businesscard). thanks