Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 82585

Re: Redaction Javascript for batch or single use

$
0
0

Ok,

So far so good, that helped quite a bit and I was able to get the quads for the 2 areas I would like to redact. Now when I compile the code from the bottom of the article and follow the instructions:

 

“To use this code, copy it to the Acrobat JavaScript Console <https://acrobatusers.com/tutorials/2006/javascript_console/>. Select and run Parts #1 and #2. Then select the code for the scheme that will be used on the current document and run it. Run only one scheme on one document.”

 

I am not able to get past selecting and running parts #1 and #2.  Below is my code and the resulting error, I do not really know how to troubleshoot this code to tell what is missing from line 5. I believe it is because the quadList being referred to is not defined as such anywhere?

 

 

// Part 1: Quads for the different Redaction areas

var qdTitle = [[26.8800048828125, 779.9100341796875, 552.3200073242188, 779.9100341796875, 26.8800048828125, 693.510009765625, 552.3200073242188, 693.510009765625]];

var qdRFL = [[26.8800048828125, 693.510009765625, 87.04000854492188, 693.510009765625, 26.8800048828125, 656.3900146484375, 87.04000854492188, 656.3900146484375]];

//Part 2: Function for adding Redact Annotations to a PDF function

AddMyRedacts(quadList)  {

     for(var pg=1; pg<this.numPages; pg++)

{

          for(var index=0; index<quadList.length; index++) {

               this.addAnnot({

                    type:"Redact", page:pg,

                    quads:quadList[index]

               });

          }

     }

}

 

 

SyntaxError: missing ; before statement

5:Console:Exec

undefined

 

Please help

 

Thanks

 

Tom


Viewing all articles
Browse latest Browse all 82585

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>