Copy link to clipboard
Copied
I have 7 different pdfs of differing file page lengths (up to of 13700 pages) in one, i need to add 2 landscape 11"x 8.5"blanks (1 after page 1 and 1 after page 5) and then repeat throughout the document. I found a Java script someone had created for adding 1 blank after every third page, and I tried to edit it but my edits don't seem to be working. I know very little in JavaScript. I am using Acrobat Pro XI. Can anyone help me, please? Thanks,
Steve @ Daily
for (var i=this.numPages; i>0; i-=4) {
this.newPage(i);
}
for (var i=this.numPages-4; i>0; i-=5) {
this.newPage(i);
}
Copy link to clipboard
Copied
So the blank pages should not be repeating, but only added once after pages 1 and 5?
Copy link to clipboard
Copied
Thanks for responding. No. The blanks should follow every series of the following pages as well IE: 1, blank,2,3,4,blank, 5 ,blank, 6,7,8, blank, 9, blank,10,11,12 blank................to the end of each of the pdfs. Hope this makes sense.
Copy link to clipboard
Copied
No, sorry, that doesn't really make sense. What are the intervals between the blanks, then?
Copy link to clipboard
Copied
After the blanks are added every 6 pages is a personalized set so : person 1 pdf is pages 1, 2(blank) , 3, 4, 5, 6(blank), next set is for person 2 : 7, 8(blank), 9,10, 11, 12(blank), next person 3: 13, 14(blank), 15,16, 17, 18(blank) and so forth to the end of the pdf.
Copy link to clipboard
Copied
OK, I understand now. It's a bit tricky, but this should do the job:
for (var i=this.numPages; i>0; i-=6) {
this.newPage(i);
}
for (var i=this.numPages-5; i>0; i-=7) {
this.newPage(i);
}
Copy link to clipboard
Copied
Thank you for your help. Unfortunately, that didn't work. It put blanks at p3,p6,p11,p14,p19,p22. I have to leave for the day but plan on trying to pick up the issue back up tomorrow am (we are having a snow storm and traffic is already a nightmare). I really appreciate your assistance.
Copy link to clipboard
Copied
I tested it on a file with 12 pages and it added blank pages as the new pages 3, 8, 11 and 16. If that's not correct then I don't follow you.
Anyway, you have the basic code for adding the blank pages. You can play around with it until you get the desired result.
Copy link to clipboard
Copied
This is what I'm shooting for, I don't understand JavaScript enough to make the edits to make it work.
Copy link to clipboard
Copied
for (var i=this.numPages; i>0; i-=4) {
this.newPage(i);
}
for (var i=this.numPages-4; i>0; i-=5) {
this.newPage(i);
}
Copy link to clipboard
Copied
Thank you so much. That works beautifully.
Copy link to clipboard
Copied
How would you manipulate this formula if each set originally had 5 pages, and I wanted to add a blank after every 1st page to make 6 pages per set?
Copy link to clipboard
Copied
Change 4 to 5 and 5 to 6 in the code above.
Copy link to clipboard
Copied
Just what I was looking for, works great, thanks for the help 🙂
Copy link to clipboard
Copied
Hi, this is the closest thread addressing my issue. Its a similar one and pretty straightforward - instead of blank pages I need to combine two different files.
PDF 1 is 10,000 records
PDF 2 is 20,000 records
I need to merge the two, but I need PDF 1 (cover sheet) to be inserted every THIRD page.
It starts with the first record of PDF 1 as page 1, followed by 2 pages of PDF 2 and that pattern repeats throughout until the end, resulting in a 30,000 page PDF with every 3rd page a PDF 1 cover sheet.
How is this done? Thanks in advance for any comments
Copy link to clipboard
Copied
You can do it using this (paid-for) tool I've developed:
https://www.try67.com/tool/acrobat-insert-one-pdf-file-into-another-multiple-times
Copy link to clipboard
Copied
the code try67 is selling looks great, a great time saver, only way I know how to do it is very time consuming, not terrible though.
1-make a copy of your files and name them 1, 2
2-splite file 2 into 2 files, name them 2 and 3
2-split files 1, 2, and 3 into 1 page files- select to add label before in split menu
3-Now the tedious part, adobe allows you to combine 400 files at a time. Make sure your folder is sorted to arrange in the order you want before combining, part 1_1, part 1_2, part1_3, part2_1, part2_2...
Select 400 files at a time and combine, with 30,000 files you would do that 75 times. Then combine those 75 and your done 🙂
Copy link to clipboard
Copied
No, my way I was thinking won't work for you, it won't put your file 2 pages back in the right order
Copy link to clipboard
Copied
To make my work it's actually a little faster than I first suggested:
1-make a copy of your files and name them 1, 2
2-split file 1 into 1 page files, file 2 into 2 page files
- select to add label before in split menu and sort the files in your folder by type to display correctly for combining, part1_1, part2_1, part1_2, part2_2...
3-Now the tedious part, adobe allows you to combine 400 files at a time. Select 400 files at a time and combine, with 20,000 files you would do that 50 times. Then combine those 50 and your done
Copy link to clipboard
Copied
Thanks for the reply! Im going to try and get 67s script to work, but this is a good backup thanks
Copy link to clipboard
Copied
sounds worth the money to me 🙂
Copy link to clipboard
Copied
Totally!