Adobe Acrobat: Difference between revisions

From The Jolly Contrarian
Jump to navigation Jump to search
No edit summary
No edit summary
Line 11: Line 11:
Type <ctrl-J>  and pop! There it is. It’s called a “Javascript [[debugger]]”. Treat yourself to a quick chortle at the [[double entendre]].
Type <ctrl-J>  and pop! There it is. It’s called a “Javascript [[debugger]]”. Treat yourself to a quick chortle at the [[double entendre]].


'''STEP THREE''': Copy and paste the following text – all of it – into the large box at the bottom of the console window:  
'''STEP THREE''': Copy and paste the following text – all of it – into the large box at the bottom of the console window. NOTE - QUOTES MUST BE STRAIGHT NOT CURLY (the JC’s installation of MediaWiki is set to automatically bend them):  


  var cnt=0;
  var cnt=0;

Revision as of 10:36, 11 May 2018

To anyone who works with words, Adobe Acrobat is an indispensable tool. If you are as obsessed with judging brevity as I am, you will have noticed it has no word count function. You would not think it is beyond the wit of Adobe’s developers to put one in. But no. In a software package that has been around since 1984, they’ve never thought to include a word counter.

But there is a way of natively counting words in Acrobat. It is the most ludicrous thing you will ever see. Here, for lovers of the fantastically absurd, it is:

STEP ONE: Open your Adobe Acrobat File.

STEP TWO: Launch the JavaScript console.

Now, steady on: do not shriek “IF YOU THINK I’M HAVING ANYTHING TO DO WITH A JAVASCRIPT CONSOLE – WHATEVER THE HELL THAT IS – THINK AGAIN, PAL”. Just do it. Trust me.

Type <ctrl-J> and pop! There it is. It’s called a “Javascript debugger”. Treat yourself to a quick chortle at the double entendre.

STEP THREE: Copy and paste the following text – all of it – into the large box at the bottom of the console window. NOTE - QUOTES MUST BE STRAIGHT NOT CURLY (the JC’s installation of MediaWiki is set to automatically bend them):

var cnt=0;

for (var p = 0; p < this.numPages; p++) cnt += getPageNumWords(p);

console.println("There are " + cnt + " words in this file.");

STEP FOUR: Highlight all the text you just pasted. It is really important you highlight the text, otherwise this will not work.

STEP FIVE: hit <ctrl-Enter>

In the console window, under your text, you will see the following:

There are n words in this file.

If you can come up with a more insane way of carrying out an elementary task in a market-leading software package, do write in.