Copy link to clipboard
Copied
hi .
i have algoritm place multi text frame in page indesign . now , i want while file page then create new page and place text frame in new page . pleas help me .
code COM(C#) or Script
Copy link to clipboard
Copied
I'll move this over to the InDesign scripting forum for you so that you can get the answer you need.
~Barb
Copy link to clipboard
Copied
I think , it is simple:
C#:
dynamic oPage=oDocument.Pages.Add();
Script:
var oPage=oDocument.pages.add();
Copy link to clipboard
Copied
o for which?
Copy link to clipboard
Copied
oDocument is your document object :
Ex:
Type oType = Type.GetTypeFromProgID("InDesign.Application");
dynamic oIndesign = Activator.CreateInstance(oType);
dynamic oDocument= oIndesign.open(@"C:\Temp\Template_Cust.indd");
dynamic oPage = oDocument.Pages.Add();
Copy link to clipboard
Copied
This is quite simple using javascript.
Here are the steps
1. Install Extended Toolkit CC (editor where you can write javascript for Indesign Scripting)
2. Open the document in which you want to add pages (This can also be done using scripting)
3. In extended toolkit right following line to add pages to the current open or active document
app.activeDocument.pages.add();
If you want to add multiple pages, add this line inside the loop.
Copy link to clipboard
Copied
Hi charur94718007 ,
if you want to add multiple pages at the end of the document one could also use this:
var numberOfPagesToAdd = 12;
var doc = app.documents[0];
var docPageLength = doc.pages.length;
doc.documentPreferences.pagesPerDocument = docPageLength + numberOfPagesToAdd ;
Regards,
Uwe