Skip to main content
tpk1982
Legend
September 19, 2017
Question

Need imposition script

  • September 19, 2017
  • 1 reply
  • 2231 views

Hi All,

Good Day. I need to make 4 page document into 2 page like below. The width will be twice before moving the page 4 into 1

Source               Final

         

The below coding Is I wrote for Indesign.

var myDoc=app.documents[0];

var mywidth=myDoc.documentPreferences.pageWidth;

var myheight=myDoc.documentPreferences.pageHeight;

var myX = (myDoc.pages[0].bounds[3] - myDoc.pages[0].bounds[1] ); 

var myY = (myDoc.pages[1].bounds[3] - myDoc.pages[1].bounds[1] ); 

myDoc.documentPreferences.pageWidth=mywidth*2;

myDoc.viewPreferences.rulerOrigin = RulerOrigin.PAGE_ORIGIN; 

app.activeWindow.transformReferencePoint = AnchorPoint.TOP_LEFT_ANCHOR;

myDoc.pages[1].pageItems.everyItem().move(myDoc.pages[1], [-myX,0]); 

myDoc.pages[2].pageItems.everyItem().duplicate(myDoc.pages[1], [0,0]); 

myDoc.pages[3].pageItems.everyItem().duplicate(myDoc.pages[0], [-myX,0]); 

myDoc.pages[3].remove();

myDoc.pages[2].remove();

I need the same functionality into PDF. I know about Quite Imposing plugin, but our team like to do this in script.

Please give me some suggestion, if anybody have this script then it would be great if you share those.

PS: I found one interesting link... Small imposition script: Where to start?

Thanks,

K

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
September 19, 2017

The question seems to have been answered in the thread you linked to... Did you try using the code provided there?

tpk1982
tpk1982Author
Legend
September 19, 2017

Hi try67,

Yes I tried. It is used for button to give the result. I am very basic in PDF scripting. The overlay concept is useful I think. But not sure how to use that.

Thanks,

K

try67
Community Expert
Community Expert
September 19, 2017

So what are you looking for, exactly? The code is available, more or less. If you wish someone to adjust it to your specific needs and convert it into a script that can be executed using a button, feel free to contact me privately (try6767 at gmail.com) and we could discuss it further.