from https://acrobatusers.com/tutorials/javascript_console


Using the Console to run code

JavaScript code can be executed directly from the Console Window. This ability is a huge time saver since it provides a fast and easy way to test out code before it's placed into a scripting location where it will be more difficult to debug.

Let's try out some simple examples. Enter the following line of code into the Console Window. 

3 + 4 

To run the code, make sure the cursor is on the same line as the text. You can place it anywhere on the line as long as nothing is selected. Either of the two following actions will cause Acrobat to run the code. 

  • Press Ctrl+Enter on Windows, or Command+Enter on Macintosh. 
  • If your keyboard has a number pad, you can use the Enter key on the number pad without pressing the Control (Command on Mac) key. Macintosh's have the additional issue of keyboard configuration mentioned earlier.

Acrobat displays the result of the execution on the next available line, also shown in Figure 4.


위의 url 을 따라가도되고..


1. cmd+j 를 눌러서 자바스크립트 디버거를 띄운다. 이때 자바스크립트 기능을 켤래? 라고 물어오는데 켠다. 혹은 메뉴에가서 직접 켠다

2. 테스트를 위해 1+2 입력후 cmd+enter 하면 3이 나온다.

3. 자..이제 본격적으로 revse .. 뒤집자. 


for (i=this.numPages-1;i>=0;i--)

this.movePage(i);


입력후 cmd+enter 로 실행. 하면 뒤집힌다. 끝 

+ Recent posts