I am starting out with this. My objective is to run
a Acrobat batch script to sort by Layered and not layered hopefully target dir
to save output file accordingly.
While I am in there Turn a Layer default off.
My layer off is working. I need to run this unattended with
success confirmation and
Error handling and
Append all to 1 report.
Currently I get 1 per file and have not worked out the sort/save
Any help would be appreciated
/* Lyr RPT Mod Test */
var rep = new Report();
rep.size = 1.2;
rep.color = color.blue;
rep.writeText ("Testing for Content");
rep.writeText("FileName : " + this.documentFileName);
for (var i = 0; i < this.numPages; i++ ) // loop thru all pages
{
var a = this.getAnnots();
var c = this.getOCGs();
var b = this.getPageBox("Crop", i);
var l = this.getLinks(i, b);
var ocgs = this.getOCGs();
for (var i=0; i
If your current algorithm is working then you can use it in a batch process, although the methodology is a bit awkward. You'll need to separate the parts of the code that create and finish the report from the code that operates on the documents. Place this code in two separte menu items or toolbar buttons. Change the code so that the Report object is assigned to a "Global" variable. If your on Acrobat 8 you will need to set the JavaScript preference that allow the Global object to be used accross documents.
The sequece for using the batch script is:
1. Execute menu item that sets up Report Object.
2. Run Batch Process
3. Execute menu item that finishes off report.
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script