These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Maxing out console.println and rep.writeText...any suggestions?

subieguy2
Registered: Apr 30 2009
Posts: 15

OK so I am at a loss for how to make this work any help would be appreciated.
I am still new to javascript so be gentle :)
 
Here is the code I have written...what it does is looks through a document and finds any button with _grid in the name assigns it a value and tells the user what page number the button resides on. The console.println lines give the user an output to copy and paste for later use. It works...it just maxes out the console because it loops through all the buttons (typically there are about 200 buttons with _grid in the name). Here it is (see next post):

My Product Information:
Acrobat Pro 8.2.6, Windows
subieguy2
Registered: Apr 30 2009
Posts: 15
code can be viewed at the following 2 links

http://wolfeden.info/console-println.jsx

http://wolfeden.info/rep-writetext.jsx
subieguy2
Registered: Apr 30 2009
Posts: 15
The rep.writeText statement works however when it loops through all of the buttons in the document it creates a new report for every instance. If there is a way to make the loop write to the same document every time that would be great.

Any help would be greatly appreciated!!
George_Johnson
Online
Expert
Registered: Jul 6 2008
Posts: 1876
Instead of either of those options, it may be better to generate a string that contains the text you want in the report and write it to a file attachment using the doc.createDataObject method. You can then extract the text file.
try67
Expert
Registered: Oct 30 2008
Posts: 2398
It doesn't seem like your script is doing what you're describing... It looks like you're printing code to the console.

If you want to just print field names to the console and are afraid you'll run out of space, then George's suggestion is the best one. However, the console can contain much more than 200 lines (I just run a test and printed 4000 lines in the console of my Acrobat 9), so the problem must lay elsewhere.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com