Skip to content

Instantly share code, notes, and snippets.

ProcessDocument = app.trustedFunction(function () {
app.beginPriv();
var newDoc = app.newDoc();
var p = app.response("Start with page(default 0 - process all pages)?", "Query", "0");
var startFrom = parseInt(p) || 0;
var i = 0;
while (i < this.numPages) {
newDoc.insertPages({
nPage: newDoc.numPages - 1,