Miran --
> i don't understand how in indesign i could adapt the page in a one click action to the content
You can't, that was the point of David Blatner's post. The nearest you get to Illustrator's functionality is a script (the point of my reply to David), and if you want Illustrator's one-click functionality, you can assign a keyboard shortcut to the script.
So you're after a way of applying the script in that link to all pages in your document, correct? That's not too hard:
if (!app.documents.length) {
alert ('Open a document.'); exit();
}
// Set up the document
app.scriptPreferences.measurementUnit = MeasurementUnits.POINTS;
app.documents[0].zeroPoint = [0,0];
app.documents[0].viewPreferences.rulerOrigin = RulerOrigin.PAGE_ORIGIN;
pages = app.documents[0].pages.everyItem().getElements();
for (i = 0; i < pages.length; i++) {
if (!pages.pageItems.length) continue;
if (pages.pageItems.length > 1) {
pages.groups.add (pages.pageItems.everyItem().getElements());
}
frame = pages.pageItems[0];
gb = frame.geometricBounds;
frame.move ([0, 0]);
pages.marginPreferences.properties = {top: 0, left: 0, bottom: 0, right: 0};
pages.resize (CoordinateSpaces.INNER_COORDINATES,
AnchorPoint.TOP_LEFT_ANCHOR,
ResizeMethods.REPLACING_CURRENT_DIMENSIONS_WITH,
[gb[3]-gb[1], gb[2]-gb[0]]
);
}
Peter