Copy link to clipboard
Copied
Hello!
I would like to place pages from a PDF on every other page (I don't have empty pages set up for it, I would like InDesign to do it for me, too, if possible).
Is there any way I can do it automaticaly, maybe by script?
Thanks in advance!
Copy link to clipboard
Copied
There are scripts for importing multipage PDFs. One of the best is here: InDesignSecrets » Blog Archive » Zanelli Releases MultiPageImporter for Importing both PDF and INDD ...
This won't skip pages, though, as far as I know, but it wouldn't, I think, be hard to write another script in insert a blank page between every pair of pages after placing the PDF.
Copy link to clipboard
Copied
as peter has written, follow the link and get the multipageimporter2.5.jsx link.
you will need another script to run afterwards which will insert a blank every second page.
var doc = app.documents[0];
var masterNames = doc.masterSpreads.everyItem().name;
var d = app.dialogs.add({name:"pick a master spread"});
d.dialogColumns.add().staticTexts.add({staticLabel:"Master Pages:"});
var dd = d.dialogColumns.add().dropdowns.add({stringList:masterNames});
if(d.show()){
var index = dd.selectedIndex;
d.destroy();
} else {
d.destroy();exit();
}
var master = doc.masterSpreads.item(index);
for(var i=doc.pages.length-1;i>=0;i--){
doc.pages.add(LocationOptions.AFTER,doc.pages,{appliedMaster:master});
}
highlight the above text, copy into textedit (mac) or notepad (pc) and save as a .jsx file and put into your scripts folder.
now, i did NOT write this script but i've unfortunately forgotten who wrote it, so can't credit the author for this script.
Copy link to clipboard
Copied
Thanks Peter and cdflash!
The story is that I have already a document with filled pages, I just want to import a PDF page between every InDesign page. What I did as of now is, I used the script that cdflash provided and now I have new empty every second page. What I would like now, is to be able to import a PDF to every other page, --and as extra credit, rotated 180º (which with the script that Peter linked to, is rotation possible).
Thanks for past and for future!
Copy link to clipboard
Copied
See, that's sort of the backwards way to do it, in my opinion, becasue it's complicated to skip a page on the import.
Both the skipping and rotation might be possible via script, but I don't write them. What you can do, though, is make sure the doc is now set up as facing pages and has a two-page master. Put a frame on one side of the master where you want the PDF, then rotate it 180. Now File > Place... , pick the PDF and show import options, choose all pages and just click in the empty frames one page at a time until the whole thing is placed.
Copy link to clipboard
Copied
Yup! That's exactly what I did as a last resort...
Copy link to clipboard
Copied
Awesome, Thank you. Just what I needed.
Copy link to clipboard
Copied
Thank you - this is just the script I need after completing a 2-up mail merge to add the back side back in (since indd doesn't allow 2-page multi-up merges)
Looked like it intially was going to work to add my Master B every other page. However, I am getting an error code on line 14. I'm not a coder, so
Error unmber 30477: Invalid value for parameter 'referece' of method 'add'
Expected Page, Spread, MasterSpread or Document, but received (Page, Page.....Page). (and page repeates to many times to retype)
Line 14 is:
doc.pages.add(LocationOptions.AFTER,doc.pages,{appliedMaster:master});
FYI: I'm on Mac High Sierra running indd 2020 CC
It seems this comes up every now and then, but since it needs to be printed today, we'll probably run it through twice - once front side, then again back side. But would still love an easier long-term solution.
Copy link to clipboard
Copied
I keep getting this same error when I run the script for every other page. Anyone know what the problem is here?
Copy link to clipboard
Copied
theres a missing [i] in the last line. Script worked after I added it:
doc.pages.add(LocationOptions.AFTER,doc.pages[i],{appliedMaster:master});}
Copy link to clipboard
Copied
Thanks to Adobe for keeping this post up here. Even 4 years later, it offered a solution for my similar issue.
However, the part of 'click in the empty frames one page at a time' would be painfully slow with a large document. My answer was similar though:
Copy link to clipboard
Copied
OMG OMG OMG
Combining Colin's post with Multipage Importer just saved me 2000 clicks!
Thanks so much for the info, and glad it's still here almost 7 years later.
Copy link to clipboard
Copied
This worked like a charm! Thank you so much!