List of Adobe Acrobat Scripts

Written by matthew caines
  • Share
  • Tweet
  • Share
  • Pin
  • Email
List of Adobe Acrobat Scripts
Some scripts can improve the printed look of your PDFs. (Hand and document at the meeting image by Dmitry Goygel-Sokol from

Acrobat JavaScript is an object-orientated language that can alter and change the appearance and database settings of a portable document format (PDF) file. It is the only scripting language pre-installed in the Adobe program and can be used to manipulate anything from user input data to PDF document templates. The Acrobat JavaScript editor is located within the Adobe program window.

Other People Are Reading

Create Contents Output Text

This particular script creates a contents list of each bookmark and page number in the PDF file. This is a good idea if you are exporting and combining a series of PDF pages and need to draw up a table of contents for it in another program like Microsoft Word. Instead of taking the time to wade through every PDF name and page number, insert the following code into Acrobat and copy and paste the output text into your Word document:

function DumpBookmark(bkm, nLevel)


var s = "";

for (var i = 0; i < nLevel; i++)

    s += " ";


    console.println(s + "" + + "\t" + (this.pageNum + 1));

if (bkm.children != null)

    for (var i = 0; i < bkm.children.length; i++)

        DumpBookmark(bkm.children[i], nLevel + 1);



console.println("Dumping all bookmarks in the document.");

DumpBookmark(this.bookmarkRoot, 0);

Remember, however, that the PDF file is now permanently embedded with the code and will output a contents text every time you open the file. Remedy this by deleting the code and saving the PDF once you have used it.

Delete Pages with No Text

It can look very unprofessional to give customers or associates a document with randomly blank pages inside. It is also a waste of paper. You can remedy this by implementing a JavaScript that removes any page in the PDF document without any words on it. Use the following code to implement the JavaScript:

try {

// save a copy of original document

var new Name = this.path;

var filename = newName.replace(".pdf","_Original.pdf");


for (var i = 0; i < this.numPages; i++)


numWords = this.getPageNumWords(i);

if (numWords == 0)


// this page has no text, delete it









Remove Toolbar

If you want to present a PDF document in a professional and artistic way, then you might consider removing the Acrobat toolbar. This will present your PDF in a full screen. Users can then press F8 to remove the full-screen mode and return Adobe Acrobat to its original reading view. Insert the script by clicking on the "Advanced" menu and selecting the "Document Processing" and "Document JavaScripts" options. Then--in the scripting box--insert the following to professionalise the look of your PDF document:

app.toolbar = true;

Other Adobe Acrobat Scripts

Other JavaScripts include those that save a PDF with a time stamp. This particular script is extremely useful for seeing previous versions of a PDF document because it does not overwrite the current file, but simply creates a new one with the time stamp. Other scripts can rotate all landscape or portrait-orientated pages and extract URL or e-mail addresses. See the Evermap link in the Resources section for an extensive list of Adobe Acrobat JavaScripts.

Don't Miss

  • All types
  • Articles
  • Slideshows
  • Videos
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.