Read Time:2 Minute, 8 Second
Informațiile au fost preluate de pe site-ul de aici.
Am testat fișierul și funcționează. De urmat pașii de mai jos:
Caution:
- Be sure to save the combined pdf as a new file if you wish to keep the original odd / even pdfs
Instruction:
- Press
Download Zip
on the top right corner - Extract
CollatePages.js
into the Javascripts folder of Adobe Reader
Windows:C:\Program Files\Adobe\Acrobat DC\Acrobat\Javascripts
Mac:/iMac/Applications/Adobe Acrobat DC/Adobe Acrobat.app/Contents/Resources/JavaScripts/
- Restart Adobe Reader if it was opened
- Open the even pages of your pdf
- Open the odd pages of your pdf (both files need to stay open during this process, otherwise it may not work for large file)
- Click
Tools
- Click
Add-on Tools
- Click
Collate
- Select the odd set of pdf file
- Save and done!
CollatePages.js :
// Complements: Planet PDF (http://www.planetpdf.com/)
// Source: https://forums.adobe.com/thread/286654?start=40&tstart=0
// Modified by
// - Christian Sass for Acrobat XI compatibility
// - Bernd Alheit for newer Acrobat compatibility
// - amoshydra for comsolidating solution
// Add a menu item to reverse all pages in the active document
app.addToolButton({ cName: "Reverse", cLabel: "Reverse", cExec: "PPReversePages();", cEnable: "event.rc = (event.target != null);"});
app.addToolButton({ cName: "Collate", cLabel: "Collate", cExec: "trustedCollatePages();", cEnable: "event.rc = (event.target != null);"});
function PPReversePages()
{
var t = app.thermometer;
t.duration = this.numPages;
t.begin();
for (i = this.numPages - 1; i >= 0; i--)
{
t.value = (i-this.numPages)*-1;
this.movePage(i);
t.text = 'Moving page ' + (i + 1);
}
t.end();
}
// Collating pages
/*
Title: Collate Document
Purpose: User is prompted to select document to insert/collate.
Author: Sean Stewart, ARTS PDF, www.artspdf.com
*/
trustedCollatePages = app.trustedFunction(function()
{
app.beginPriv(); // Explicitly raise privileges
// create an array to use as the rect parameter in the browse for field
var arRect = new Array();
arRect[0] = 0;
arRect[1] = 0;
arRect[2] = 0;
arRect[3] = 0;
// create a non-visible form field to use as a browse for field
var f = this.addField("txtFilename", "text", this.numPages - 1, arRect);
f.delay = true;
f.fileSelect = true;
f.delay = false;
// user prompted to select file to collate the open document with
app.alert("Select the PDF file to merge with")
// open the browse for dialog
f.browseForFileToSubmit();
var evenDocPath = f.value;
var q = this.numPages;
// insert pages from selected document into open document
for (var i = 0;i < q; i++) {
var j = i*2;
this.insertPages(j, evenDocPath, i);
}
// remove unused field
this.removeField("txtFilename");
app.endPriv();
})