I can open a number of indesign files using this code: var sourceFiles = File.openDialog ("Show me the source","*.indd", true), destPage = app.activeDocument.pages[0], sourceFile, sourceDoc, sourceFrame, outFrame, mX = 0, mY = 0; while (sourceFile = sourceFiles.shift()) { sourceDoc = app.open(sourceFile, false); sourceFrame = sourceDoc.pages[0].pageItems[0]; outFrame = sourceFrame.duplicate(destPage,[mX,mY]); // mX += outFrame.geometricBounds[3] - outFrame.geometricBounds[1]; // sourceDoc.close(SaveOptions.NO); } now i want fiting every file into a rectangle. For example, I made a rectangle manually: var sourceFiles = File.openDialog ("Show me the source","*.indd", true), destPage = app.activeDocument.pages[0], sourceFile, sourceDoc, sourceFrame, outFrame, mX = 0, mY = 0; while (sourceFile = sourceFiles.shift()) { sourceDoc = app.open(sourceFile, false); sourceFrame = sourceDoc.pages[0].pageItems[0]; var myDocument = app.documents.add(); var myRectangle = myDocument.pages.item(0).rectangles.add(); myRectangle.geometricBounds = ["50p", "20p", "40p", "40p"]; myRectangle.fit(sourceFrame.duplicate(destPage,[mX,mY])); // mX += outFrame.geometricBounds[3] - outFrame.geometricBounds[1]; // sourceDoc.close(SaveOptions.NO); } But it's a problem. please help
... View more